Re: Winsock blocking hook problems.

From: Steve James <sjames_at_randomc.com>
Date: 1996/02/17
Message-ID: <4g5bks$gqg_at_newsfeed.randomc.com>#1/1


seto_at_rop2.hitachi-cable.co.jp (SETO Koichiro) wrote:

>Do you mean that we should not use blocking hook in a pre-emptive OS like
>Win95?
>If the OS is pre-emptive, I thought blocking will not be a problem because
>the task is scheduled non-blockingly by the OS anyway. Tell me where my
>understanding is wrong.

Greetings.
The blocking hook exists for cooperative tasking such as Win 3.1. The idea is that if you have made a blocking call without a blocking hook, your app would just sit there and wait, which means it will not yield to other tasks, in other words, everything comes to a stop. The blocking hook allows your app (and any others being run) to continue executing (and opens up a number of re-entrancy issues as well.).

In a preemptive environment, the blocking hook is a waste of time and code. The call will block, but all other programs will continue to run because of the preemptive tasking. If you need your winsock app to continue doing other things while making a blocking call, you can use a helper thread to handle the blocking calls.

Hope this helps,
Steve J.

>Thanks in advance.
 

>Seto
>seto_at_rop2.hitachi-cable.co.jp
Received on Sat Feb 17 1996 - 00:00:00 CET

Original text of this message