equal
deleted
inserted
replaced
2720 "arrange for a semaphore to be triggered when input on aStream arrives. |
2720 "arrange for a semaphore to be triggered when input on aStream arrives. |
2721 This will do a select, if the OS supports selecting on that filedescriptor, |
2721 This will do a select, if the OS supports selecting on that filedescriptor, |
2722 otherwise, it will be polled every few milliseconds (MSDOS)." |
2722 otherwise, it will be polled every few milliseconds (MSDOS)." |
2723 |
2723 |
2724 aStream canBeSelected ifTrue:[ |
2724 aStream canBeSelected ifTrue:[ |
2725 "/ can this stream be selected on ? |
2725 "/ can this stream be selected on ? |
2726 self signal:aSemaphore onInput:aStream fileDescriptor orCheck:nil |
2726 self signal:aSemaphore onInput:aStream fileHandle orCheck:nil |
2727 ] ifFalse:[ |
2727 ] ifFalse:[ |
2728 "/ nope - must poll ... |
2728 "/ nope - must poll ... |
2729 self signal:aSemaphore onInput:nil orCheck:[aStream canReadWithoutBlocking] |
2729 self signal:aSemaphore onInput:nil orCheck:[aStream canReadWithoutBlocking] |
2730 ] |
2730 ] |
2731 |
2731 |
2732 "Modified: / 14.12.1999 / 23:58:50 / cg" |
2732 "Modified: / 14.12.1999 / 23:58:50 / cg" |
2733 ! |
2733 ! |
2734 |
2734 |
2821 "arrange for a semaphore to be triggered when output on aStream is possible. |
2821 "arrange for a semaphore to be triggered when output on aStream is possible. |
2822 This will do a select, if the OS supports selecting on that filedescriptor, |
2822 This will do a select, if the OS supports selecting on that filedescriptor, |
2823 otherwise, it will be polled every few milliseconds (MSDOS)." |
2823 otherwise, it will be polled every few milliseconds (MSDOS)." |
2824 |
2824 |
2825 aStream canBeSelected ifTrue:[ |
2825 aStream canBeSelected ifTrue:[ |
2826 "/ can this stream be selected on ? |
2826 "/ can this stream be selected on ? |
2827 self signal:aSemaphore onOutput:aStream fileDescriptor orCheck:nil |
2827 self signal:aSemaphore onOutput:aStream fileHandle orCheck:nil |
2828 ] ifFalse:[ |
2828 ] ifFalse:[ |
2829 "/ nope - must poll ... |
2829 "/ nope - must poll ... |
2830 self signal:aSemaphore onOutput:nil orCheck:[aStream canWriteWithoutBlocking] |
2830 self signal:aSemaphore onOutput:nil orCheck:[aStream canWriteWithoutBlocking] |
2831 ] |
2831 ] |
2832 |
2832 |
2833 "Modified: / 14.12.1999 / 23:59:19 / cg" |
2833 "Modified: / 14.12.1999 / 23:59:19 / cg" |
2834 ! ! |
2834 ! ! |
2835 |
2835 |