~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/pool_of_threads/pool_of_threads.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "session_scheduler.h"
30
30
#include <string>
31
31
#include <queue>
32
 
#include <set>
 
32
#include <boost/unordered_set.hpp>
33
33
#include <event.h>
34
34
 
35
35
 
42
42
private:
43
43
  pthread_attr_t attr;
44
44
 
45
 
  pthread_mutex_t LOCK_session_add;    /* protects sessions_need_adding */
46
 
  pthread_mutex_t LOCK_session_kill;    /* protects sessions_to_be_killed */
 
45
  boost::mutex LOCK_session_add;    /* protects sessions_need_adding */
 
46
  boost::mutex LOCK_session_kill;    /* protects sessions_to_be_killed */
47
47
  /**
48
48
   * LOCK_event_loop protects the non-thread safe libevent calls (event_add
49
49
   * and event_del) and sessions_need_processing and sessions_waiting_for_io.
50
50
   */
51
 
  pthread_mutex_t LOCK_event_loop;
 
51
  boost::mutex LOCK_event_loop;
52
52
 
53
53
  std::queue<drizzled::Session *> sessions_need_adding; /* queue of sessions to add to libevent queue */
54
54
  std::queue<drizzled::Session *> sessions_to_be_killed; /* queue of sessions to be killed */
58
58
   *
59
59
   * This should really be a collection of unordered Sessions. No one is more
60
60
   * promising to encounter an io event earlier than another; so no order
61
 
   * indeed! We will change this to unordered_set/hash_set when c++0x comes.
 
61
   * indeed!
62
62
   */
63
 
  std::set<drizzled::Session *> sessions_waiting_for_io;
 
63
  boost::unordered_set<drizzled::Session *> sessions_waiting_for_io;
64
64
 
65
65
public:
66
66
  PoolOfThreadsScheduler(const char *name_arg);