added some experimental code
This commit is contained in:
@ -612,7 +612,7 @@ error -> exception
|
||||
].
|
||||
|
||||
[
|
||||
| s s2 st |
|
||||
| s s2 st sg |
|
||||
[
|
||||
s := Socket domain: Socket.Domain.INET type: Socket.Type.STREAM.
|
||||
##s connect: (SocketAddress fromString: '127.0.0.1:9999') do: conact.
|
||||
@ -624,13 +624,25 @@ error -> exception
|
||||
## ###s2 listen: 10; watchInput.
|
||||
## s2 listen: 10 do: accact.
|
||||
|
||||
st := Semaphore new.
|
||||
System addAsyncSemaphore: st.
|
||||
System signal: st afterSecs: 5.
|
||||
'JJJJJJJJJJJ' dump.
|
||||
sg := SemaphoreGroup new.
|
||||
'JJJJJJJJJJJ' dump.
|
||||
sg wait.
|
||||
'YYYYYYYYYYYYYYY' dump.
|
||||
|
||||
###[ while (1) { '1111' dump. System sleepForSecs: 1 } ] fork.
|
||||
|
||||
st := Semaphore new.
|
||||
System addAsyncSemaphore: st.
|
||||
System signal: st afterSecs: 20.
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (System handleAsyncEvent isError) { break }.
|
||||
}.
|
||||
|
||||
]
|
||||
ensure:
|
||||
[
|
||||
|
Reference in New Issue
Block a user