added some experimental code

This commit is contained in:
hyunghwan.chung
2018-04-13 10:14:12 +00:00
parent 7b114e3b27
commit 0d40016fa1
3 changed files with 23 additions and 7 deletions

View File

@ -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:
[