summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/ThreadPoolCurrent.java
blob: 9639b6bc2f86f2c42c777a99f03c3a1c5e292b84 (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
// **********************************************************************
//
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

package IceInternal;

public final class ThreadPoolCurrent
{
    ThreadPoolCurrent(Instance instance, ThreadPool threadPool)
    {
        operation = SocketOperation.None;
        stream = new BasicStream(instance);

        _threadPool = threadPool;
        _ioCompleted = false;
        _leader = false;
    }

    public int operation;
    public BasicStream stream; // A per-thread stream to be used by event handlers for optimization.

    public void
    ioCompleted()
    {
        _threadPool.ioCompleted(this);
    }
    
    final ThreadPool _threadPool;
    EventHandler _handler;
    boolean _ioCompleted;
    boolean _leader;
}