On 08 Jan 2016, at 3:24 , Denis Kudriashov <dionisiydk@gmail.com> wrote:
2016-01-08 15:17 GMT+01:00 Henrik Johansen <henrik.s.johansen@veloxit.no <mailto:henrik.s.johansen@veloxit.no>>: Which is why in terminate I do myList := self suspend.
So the semaphore *should* still be the suspendingList, just without the process actually on the list...
I just test it in workspace. sema := Semaphore new. p := [sema wait] fork. p suspend. p suspendingList == nil sema asArray isEmpty
Of course, that's something entirely different... if you do what I actually do in the modified terminate; sema := Semaphore new. p := [sema wait ] newProcess. p resume. 1 second wait. list := p suspend. "this list is (re)assigned to myList in terminate" list == nil list == sema You should get different answers. Cheers, Henry