Thread Problem

  • Thread starter Thread starter JC
  • Start date Start date
Hernando said:
En un newsgroup en castellano no debo escribir en inglés
....

Blame the originator (JC) who chose to post in both English- and
Spanish-speaking newsgroups at the same time. And BTW, if you are so keen on
keeping newsgroups "clean" language-wise, why did you post the above in the
English-speaking groups too?

Ebbe
 
Hernando said:
Dejá de escribir en inglés, bobo

Hernando,

I assumed since the OP used English that all groups were English. I
sincerly apologize for posting in a Spanish group.

Brian
 
Hi Brian,

It was strange to me as well, at first, but it makes perfect sense now.

For one thing, if you try to cancel any asynchronous operation without the
use of synchronization objects there will be some exception thrown, whether
it's ThreadAbortException or something else. I think the lack of a
mechanism to cancel async operations in Sockets has more to do with
threading architecture than it does with the Sockets implementation. But
even in the Winsock architecture on which Sockets is built, canceling a
blocking operation results in an error, although it's allowed. This article
states how canceling any operation other than Accept or Select may render
the Socket unusable so that only Close may be called:

"WSPCancelBlockingCall"
http://msdn2.microsoft.com/en-us/library/ms742269.aspx

And check out this article too which explains how the WSACancelBlockingCall
(different from above) is now deprecated in Winsock 2.0. The article
recommends using a custom synchronization mechanism on another thread if
your application needs to be designed so that blocking calls may be legally
cancelled (although that's just my interpretation):

"WSACancelBlockingCall"
http://msdn2.microsoft.com/en-us/library/ms741547.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top