Am I the only programmer in the world that uses always wait conditions and never uses semaphores? @nothings @cmuratori
@sssmcgrath @jwatte @rygorous @nothings I mean you _already have to have_ an integer value that you interlock-compare-exchange, right?
-
-
@sssmcgrath@jwatte@rygorous@nothings So a semaphore just makes _actual use of the value_ rather than just seeing if it's not zero. -
@sssmcgrath@jwatte@rygorous@nothings Maybe that's a naive view, but it seems like getting more leverage out of your sync primitive to me. - Show replies
New conversation -
-
-
@cmuratori@jwatte@rygorous@nothings Yeah that definitely makes sense, that difference is pretty minor though... I was more referring toThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@jwatte@rygorous@nothings how the signal is done, which is going to be the same... and doing it "manually" puts you in a stateThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@jwatte@rygorous@nothings where all threads including the producer are waiting on the same valueThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@jwatte@rygorous@nothings Like I said, I don't actually think my way is better, it's just how I've always done it -
@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. - Show replies
New conversation -
-
-
@cmuratori@jwatte@rygorous@nothings this is the code I pasted to Sean a while back: http://pastebin.com/6jjCmSfi , in between line 10 and 11Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@jwatte@rygorous@nothings you're in a state that I don't think you can easily get with semaphoresThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@cmuratori@jwatte@rygorous@nothings (I might be wrong, I don't use them)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.