blob: 4a13088a48848d20ea6104f66272ca2608e865ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
package IceInternal;
public final class ThreadPoolCurrent
{
ThreadPoolCurrent(Instance instance, ThreadPool threadPool, ThreadPool.EventHandlerThread thread)
{
operation = SocketOperation.None;
stream = new Ice.InputStream(instance, Protocol.currentProtocolEncoding);
_threadPool = threadPool;
_thread = thread;
_ioCompleted = false;
_leader = false;
}
public int operation;
public Ice.InputStream stream; // A per-thread stream to be used by event handlers for optimization.
public boolean
ioReady()
{
return (_handler._registered & operation) > 0;
}
public void
ioCompleted()
{
_threadPool.ioCompleted(this);
}
public void
dispatchFromThisThread(DispatchWorkItem workItem)
{
_threadPool.dispatchFromThisThread(workItem);
}
final ThreadPool _threadPool;
final ThreadPool.EventHandlerThread _thread;
EventHandler _handler;
boolean _ioCompleted;
boolean _leader;
}
|