@jwatte @rygorous @nothings @cmuratori I don't understand how a mutex lock and a signal could be more expensive... I don't know how...
-
-
Replying to @sssmcgrath
@jwatte@rygorous@nothings@cmuratori semaphores are implemented, but I wouldn't be surprised if they were wrappers around a cond & mutex2 replies 0 retweets 0 likes -
Replying to @sssmcgrath
@sssmcgrath@jwatte@rygorous@nothings I don't see why they would do that - wouldn't it just be a compare-exchange?1 reply 0 retweets 0 likes -
Replying to @cmuratori
@sssmcgrath@jwatte@rygorous@nothings I mean you _already have to have_ an integer value that you interlock-compare-exchange, right?8 replies 0 retweets 0 likes -
Replying to @cmuratori
@cmuratori@jwatte@rygorous@nothings Like I said, I don't actually think my way is better, it's just how I've always done it1 reply 0 retweets 0 likes -
Replying to @sssmcgrath
@sssmcgrath@jwatte@rygorous@nothings But don't you end up waking up too many threads? Like say it's 16-way threading, and one item.1 reply 0 retweets 0 likes -
Replying to @cmuratori
@sssmcgrath@jwatte@rygorous@nothings I guess "who cares" is a reasonable answer there, but seems good to get it since it's free?1 reply 0 retweets 0 likes -
Replying to @cmuratori
@cmuratori@jwatte@rygorous@nothings yeah for sure, maybe semaphores with manual thread signaling? or just do the lock cmpxchg manually1 reply 0 retweets 0 likes -
Replying to @sssmcgrath
@sssmcgrath@jwatte@rygorous@nothings No, I mean the semaphores just do this automatically. You don't have to do anything.2 replies 0 retweets 0 likes -
Replying to @cmuratori
@sssmcgrath@jwatte@rygorous@nothings You push n items in the queue, you dec the semaphore by n. Done.1 reply 0 retweets 0 likes
@sssmcgrath @jwatte @rygorous @nothings Always wakes up enough number of threads, no race conditions.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.