Re: [gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-22 Thread J. Roeleveld
On Wednesday, August 13, 2014 08:19:19 PM Grant Edwards wrote: > On 2014-08-13, Alec Ten Harmsel wrote: > >> I may have to stick with sockets when I want to block until some event > >> happens. > > > > To be clear, do you want to block or sleep/yield until an event > > happens? > > I don't see t

Re: [gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-13 Thread Alec Ten Harmsel
On Wed 13 Aug 2014 04:19:19 PM EDT, Grant Edwards wrote: > On 2014-08-13, Alec Ten Harmsel wrote: > >>> I may have to stick with sockets when I want to block until some event >>> happens. >> >> To be clear, do you want to block or sleep/yield until an event >> happens? > > I don't see the differen

Re: [gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-13 Thread Alan McKinnon
On 13/08/2014 22:28, Grant Edwards wrote: >> Have you considered a really simple solution like dbus? > I don't know if I would call dbus "really simple". :) > > My current implementation uses Unix domain sockets (which is what dbus > usually uses, isn't it?), and I'm trying to figure out how to r

[gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-13 Thread Grant Edwards
On 2014-08-13, Alan McKinnon wrote: > On 13/08/2014 19:21, Grant Edwards wrote: >> This is not Gentoo specific, and while I'm doing my prototyping and >> development on a Gentoo system, the eventual target is not going to >> be running Gentoo -- so feel free to ignore this thread or throw >> thin

[gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-13 Thread Grant Edwards
On 2014-08-13, Alec Ten Harmsel wrote: >> I may have to stick with sockets when I want to block until some event >> happens. > > To be clear, do you want to block or sleep/yield until an event > happens? I don't see the difference -- isn't that what a blocking call does: sleep/yield until some e

Re: [gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-13 Thread Alec Ten Harmsel
On Wed 13 Aug 2014 03:23:21 PM EDT, Grant Edwards wrote: > On 2014-08-13, Alec Ten Harmsel wrote: >> 2014-08-13 12:21 GMT-05:00 Grant Edwards : > >> Without knowing what you're doing, this sounds like a bad idea; if >> you *need* to synchronize threads, why aren't they running in the >> same proce

[gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-13 Thread Grant Edwards
On 2014-08-13, Andrés Becerra Sandoval wrote: > In short: > > Withouth the use of the lock, the condition variable and a shared > variable in concert you can get in trouble! That is often true, but 1) I don't have a shared variable that I want to associate with the condition variable. Th

[gentoo-user] Re: OT: pthreads condition variable/mutex question

2014-08-13 Thread Grant Edwards
On 2014-08-13, Alec Ten Harmsel wrote: > 2014-08-13 12:21 GMT-05:00 Grant Edwards : > Without knowing what you're doing, this sounds like a bad idea; if > you *need* to synchronize threads, why aren't they running in the > same process? I'm trying to decouple different portions of a system as mu