18 Nov 21:35
[asio]Can I call socket.close() in different thread?
From: Wang Yun <a_hao <at> 21cn.com>
Subject: [asio]Can I call socket.close() in different thread?
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-11-18 20:39:20 GMT
Subject: [asio]Can I call socket.close() in different thread?
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-11-18 20:39:20 GMT
Hi I use a thread pool to run one io_service instance, after a socket connected to a server, I want to call _socket.close() to close it. But I don't know how to do this in thread safe way. In the document, socket class is "Shared objects: Unsafe", becase I use thread pool, so I don't know which thread will call close on the socket. What should I do? Thanks, Wang Yun
_______________________________________________ Boost-users mailing list Boost-users <at> lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
RSS Feed