Permalink
Browse files

Revert "set stack size; stubbed not used at this point"

This reverts commit c619fcb.
  • Loading branch information...
1 parent 6ec18b2 commit 4ff37d67a414de341918f029f64e2c7ca4f260cd @RedBeard0531 RedBeard0531 committed Jun 20, 2011
Showing with 2 additions and 22 deletions.
  1. +2 −22 util/message_server_port.cpp
@@ -93,28 +93,13 @@ namespace mongo {
}
- void* trun(void *v) {
- pms::threadRun( (MessagingPort*) v );
- return 0;
- }
-
-#if defined(__linux__) && defined(_DEBUG)
-//#define POSIXSTACKSIZE 1
-#endif
-
class PortMessageServer : public MessageServer , public Listener {
-#if defined(POSIXSTACKSIZE)
- pthread_attr_t attr;
-#endif
public:
PortMessageServer( const MessageServer::Options& opts, MessageHandler * handler ) :
Listener( opts.ipList, opts.port ) {
+
uassert( 10275 , "multiple PortMessageServer not supported" , ! pms::handler );
pms::handler = handler;
-#if defined(POSIXSTACKSIZE)
- pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, 512 * 1024);
-#endif
}
virtual void accepted(MessagingPort * p) {
@@ -131,12 +116,7 @@ namespace mongo {
}
try {
-#if defined(POSIXSTACKSIZE)
- pthread_t tid;
- assert( pthread_create(&tid, &attr, trun, p) == 0 );
-#else
- boost::thread thr( boost::bind( &pms::threadRun , p ) );
-#endif
+ boost::thread thr( boost::bind( &pms::threadRun , p ) );
}
catch ( boost::thread_resource_error& ) {
connTicketHolder.release();

0 comments on commit 4ff37d6

Please sign in to comment.