[Q] SharedQueue Bug or Feature?
Sungijn Chun
chunsj at embian.com
Thu Aug 4 14:49:31 UTC 2005
Hi,
I'm trying to create producer/consumer example using SharedQueue class.
But when I want to fill queue(which is a instance of SharedQueue) with 2
different processes like this:
[1 to: 20 do: [ :i |
| j |
j _ queue nextPut: i.
Transcript show: 'Push: ', (i asString), '(', (j asString), ')'; cr
]] fork.
[21 to: 40 do: [ :i |
| j |
j _ queue nextPut: i.
Transcript show: 'Push: ', (i asString), '(', (j asString), ')'; cr
]] fork.
the queue does not contain entire 40 elements, it just drops some of them
randomly. I think SharedQueue can handle this kind of situation but I
cannot
figure out what is my problem. I'm using 3.8 image in windows and linux.
Thanks in advance.
More information about the Squeak-dev
mailing list
|