global-io.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #include "global-io.hpp"
27 #include <boost/thread/tss.hpp>
28 
29 namespace nfd {
30 
31 namespace scheduler {
32 // defined in scheduler.cpp
33 void
35 } // namespace scheduler
36 
37 
38 static boost::thread_specific_ptr<boost::asio::io_service> g_ioService;
39 
40 boost::asio::io_service&
42 {
43  if (g_ioService.get() == nullptr) {
44  g_ioService.reset(new boost::asio::io_service());
45  }
46  return *g_ioService;
47 }
48 
49 void
51 {
53  g_ioService.reset();
54 }
55 
56 } // namespace nfd
static boost::thread_specific_ptr< boost::asio::io_service > g_ioService
Definition: global-io.cpp:38
void resetGlobalIoService()
Definition: global-io.cpp:50
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition: algorithm.hpp:32
void resetGlobalScheduler()
Definition: scheduler.cpp:59
boost::asio::io_service & getGlobalIoService()
Definition: global-io.cpp:41