On Fri, 23 Apr 2010, Szak�ts Viktor wrote:

Hi,

> Shouldn't the NETIO server API call make an RTE 
> if not called in MT mode?

Only one function needs MT in NETIO server part.
It's NETIO_MTSERVER(). All other code perfectly well works in single
thread mode and are fully usable. I.e. someone can prefer single
thread server only for some dedicated connection or using HB_FORK()
and do not want to use MT HVM.
The example of HBNETIO server uses:
   REQUEST HB_MT
so it cannot be linked with non MT HVM version due to link time error.
So we can talk noly about NETIO_MTSERVER() function.
Now this function return <pListenSocket> or NIL on any errors (i.e.
the IP port is already in used or code was linked with non MT HVM
so user should always check the return value.
If you think that it may help users then such RTE can be added only
to this function as:

   ELSE
      [...] // gen RTE

in the 'IF hb_mtvm()' statement in netiomt.prg but other code should
not force in any way MT mode.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to