[Factor-talk] Channels vocab

2010-08-12 Thread Grisha Freilikhman
Hi, I thought about next scenario: lets assume S(sender) and R(receiver) threads communicating on the same channel with senders and receivers vectors are empty. S: checks if receivers vector empty = push itself to the senders vector, just before the suspend word processed R thread get control.

Re: [Factor-talk] Channels vocab

2010-08-12 Thread Chris Double
On Thu, Aug 12, 2010 at 8:55 PM, Grisha Freilikhman grish...@gmail.com wrote: on the same channel with senders and receivers vectors are empty. S: checks if receivers vector empty = push itself to the senders vector, just before the suspend word processed     R thread get control. Factor

Re: [Factor-talk] Channels vocab

2010-08-12 Thread Grisha Freilikhman
And there is no way that two threads will be running simultaneously (On multi-core processors) ? On Thu, Aug 12, 2010 at 12:23 PM, Chris Double chris.dou...@double.co.nzwrote: On Thu, Aug 12, 2010 at 8:55 PM, Grisha Freilikhman grish...@gmail.com wrote: on the same channel with senders and

Re: [Factor-talk] Channels vocab

2010-08-12 Thread Chris Double
On Thu, Aug 12, 2010 at 9:53 PM, Grisha Freilikhman grish...@gmail.com wrote: And there is no way that two threads will be running simultaneously (On multi-core processors) ? Correct. The only way (at the moment) to utilize multiple cores is to fork or spawn another Factor instance. Chris. --

Re: [Factor-talk] Channels vocab

2010-08-12 Thread Grisha Freilikhman
Thanks, then how concurrency is implemented in Factor? For real concurrency you need preemption. On Thu, Aug 12, 2010 at 1:15 PM, Chris Double chris.dou...@double.co.nzwrote: On Thu, Aug 12, 2010 at 9:53 PM, Grisha Freilikhman grish...@gmail.com wrote: And there is no way that two threads