File tree 2 files changed +0
-43
lines changed
2 files changed +0
-43
lines changed Original file line number Diff line number Diff line change @@ -50,29 +50,6 @@ void CpuBoundWork::Done()
50
50
}
51
51
}
52
52
53
- IoBoundWorkSlot::IoBoundWorkSlot (boost::asio::yield_context yc)
54
- : yc(yc)
55
- {
56
- IoEngine::Get ().m_CpuBoundSemaphore .fetch_add (1 );
57
- }
58
-
59
- IoBoundWorkSlot::~IoBoundWorkSlot ()
60
- {
61
- auto & ioEngine (IoEngine::Get ());
62
-
63
- for (;;) {
64
- auto availableSlots (ioEngine.m_CpuBoundSemaphore .fetch_sub (1 ));
65
-
66
- if (availableSlots < 1 ) {
67
- ioEngine.m_CpuBoundSemaphore .fetch_add (1 );
68
- IoEngine::YieldCurrentCoroutine (yc);
69
- continue ;
70
- }
71
-
72
- break ;
73
- }
74
- }
75
-
76
53
LazyInit<std::unique_ptr<IoEngine>> IoEngine::m_Instance ([]() { return std::unique_ptr<IoEngine>(new IoEngine ()); });
77
54
78
55
IoEngine& IoEngine::Get ()
Original file line number Diff line number Diff line change @@ -50,25 +50,6 @@ class CpuBoundWork
50
50
bool m_Done;
51
51
};
52
52
53
- /* *
54
- * Scope break for CPU-bound work done in an I/O thread
55
- *
56
- * @ingroup base
57
- */
58
- class IoBoundWorkSlot
59
- {
60
- public:
61
- IoBoundWorkSlot (boost::asio::yield_context yc);
62
- IoBoundWorkSlot (const IoBoundWorkSlot&) = delete ;
63
- IoBoundWorkSlot (IoBoundWorkSlot&&) = delete ;
64
- IoBoundWorkSlot& operator =(const IoBoundWorkSlot&) = delete ;
65
- IoBoundWorkSlot& operator =(IoBoundWorkSlot&&) = delete ;
66
- ~IoBoundWorkSlot ();
67
-
68
- private:
69
- boost::asio::yield_context yc;
70
- };
71
-
72
53
/* *
73
54
* Async I/O engine
74
55
*
@@ -77,7 +58,6 @@ class IoBoundWorkSlot
77
58
class IoEngine
78
59
{
79
60
friend CpuBoundWork;
80
- friend IoBoundWorkSlot;
81
61
82
62
public:
83
63
IoEngine (const IoEngine&) = delete ;
You can’t perform that action at this time.
0 commit comments