Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 19 23:17
    jClaireCodesStuff synchronize #698
  • Sep 18 23:31
    jClaireCodesStuff opened #698
  • Sep 18 00:47
    jClaireCodesStuff opened #697
  • Sep 15 18:18
    jondot opened #696
  • Sep 14 19:35
    nikomatsakis synchronize #695
  • Sep 14 19:33
    nikomatsakis opened #695
  • Sep 13 14:14
    magnusmanske opened #694
  • Sep 09 23:08
    tiby312 edited #693
  • Sep 09 23:07
    tiby312 edited #693
  • Sep 09 23:04
    tiby312 edited #693
  • Sep 09 23:04
    tiby312 opened #693
  • Sep 06 21:01
    bors[bot] closed #692
  • Sep 06 21:01
    bors[bot] closed #687
  • Sep 06 21:01

    bors[bot] on master

    Link the iterator traits from t… Typo in docs Co-Authored-By: J… Merge #692 692: Link the itera… (compare)

  • Sep 06 19:33

    bors[bot] on staging.tmp

    (compare)

  • Sep 06 19:33

    bors[bot] on staging

    Merge #692 692: Link the itera… (compare)

  • Sep 06 19:33

    bors[bot] on staging.tmp

    Link the iterator traits from t… Typo in docs Co-Authored-By: J… [ci skip][skip ci][skip netlify… (compare)

  • Sep 06 19:33

    bors[bot] on staging.tmp

    [ci skip][skip ci][skip netlify] (compare)

  • Sep 06 19:32
    vorner synchronize #692
  • Sep 06 19:25

    bors[bot] on staging.tmp

    (compare)

Niko Matsakis
@nikomatsakis
@cuviper :wave:
Josh Stone
@cuviper
welcome back!
Niko Matsakis
@nikomatsakis
thanks :)
I'm still "coming back online"
how are things?
Josh Stone
@cuviper
I know the feeling, probably a mountain of email
things are good here
fairly quiet in rayon, at least :)
I poked at a new spawn_future in #679, but I'm an amateur in this area
Niko Matsakis
@nikomatsakis
ah, cool
next week btw I'll be in PDX basically all week
Josh Stone
@cuviper
hey, me too!
naturally
Niko Matsakis
@nikomatsakis
:)
i'll be busy tuesday but maybe wed we can grab a coffee or something, plot some plans
I still want to force @aturon to participate
I was going to say -- should I just go over PRs and look for reviews?
(at this moment, I mean)
Josh Stone
@cuviper
PRs are mostly old stuff
#679 as mentioned for Future
#673 is the genericity thing -- waiting to see if the related rust PR will land
#670 is kind of on hold -- I'm hoping crossbeam can improve their own allocation story
#629 has an api question about into_remainder
the rest is stale
Niko Matsakis
@nikomatsakis
ok
I'd like to check out the future thing
sorry, got distracted, I suck this week :)
probably we'll really get back going post rustconf
Josh Stone
@cuviper
sure :)
and yeah, meeting up wednesday would be nice
Josh Stone
@cuviper
@stjepang I saw the announcement of async-std, congrats!
now my question, would my rayon spawn_future be usable with this?
or would you just task::spawn(async { /* something using rayon */ })?
Stuart Axelbrooke
@soaxelbrooke
Howdy! I am seeing a globally built thread pool only spawn 1 thread (should be 4) - any tips on how to debug this? I observed this via a work queue where workers lock one of 4 resources (1 per thread) to do their work, but only 1 lock is ever being attempted at a time. The thread pool is used via something.into_par_iter().for_each(...).
Josh Stone
@cuviper
@soaxelbrooke what does rayon::current_num_threads() say?
Stuart Axelbrooke
@soaxelbrooke
I'll check, brb!
It's reporting 4 threads
Josh Stone
@cuviper
well at least that's what you expected :)
Stuart Axelbrooke
@soaxelbrooke
:P
Josh Stone
@cuviper
what type is something, and how many items does it have?
Stuart Axelbrooke
@soaxelbrooke
its a vector of work items, ~1000 items long
owned by the function that into_par_iter() is being invoked in
Josh Stone
@cuviper
how are you selecting which to lock among your 4 resources?
Stuart Axelbrooke
@soaxelbrooke
it iterates over the vec of workers calling try_lock() until one is available. It logs before attempting try_lock (just in case it blocked for some reason), but only one thread ever logs an attempt.
Josh Stone
@cuviper
you could just pick workers[rayon::current_thread_index()] if the lengths match
Stuart Axelbrooke
@soaxelbrooke
that's good to know!
it was definitely a hack that has stuck around
Josh Stone
@cuviper
once you get this working, you might try for_each_init where the init function is the one that locks your worker locally, returning the MutexGuard
but backing up, it's strange that you don't even get your logged attempts
Stuart Axelbrooke
@soaxelbrooke
I added the thread index to the logging, and it looks like different threads are active, just never at the same time...