Examples of blockingLock()


Examples of java.nio.channels.SelectableChannel.blockingLock()

        if (!(channel instanceof SelectableChannel)) {
            throw getRuntime().newErrnoENOPROTOOPTError();
        }

        SelectableChannel selectable = (SelectableChannel)channel;
        synchronized (selectable.blockingLock()) {
            boolean oldBlocking = selectable.isBlocking();
            try {
                selectable.configureBlocking(false);

                try {
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

            }
        }

        SelectableChannel selectable = (SelectableChannel)channel;

        synchronized (selectable.blockingLock()) {
            boolean oldBlocking = selectable.isBlocking();

            try {
                selectable.configureBlocking(false);
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

    public IRubyObject accept_nonblock(ThreadContext context) {
        Ruby runtime = context.runtime;

        SelectableChannel selectable = (SelectableChannel)channel;

        synchronized (selectable.blockingLock()) {
            boolean oldBlocking = selectable.isBlocking();

            try {
                selectable.configureBlocking(false);
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

    private RubyArray doAcceptNonblock(ThreadContext context, Channel channel) {
        try {
            if (channel instanceof SelectableChannel) {
                SelectableChannel selectable = (SelectableChannel)channel;

                synchronized (selectable.blockingLock()) {
                    boolean oldBlocking = selectable.isBlocking();

                    try {
                        selectable.configureBlocking(false);
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

    public boolean select(Channel channel, OpenFile fptr, int ops, long timeout) {
        // Use selectables but only if they're not associated with a file (which has odd select semantics)
        if (channel instanceof SelectableChannel && (fptr == null || !fptr.fd().isNativeFile)) {
            SelectableChannel selectable = (SelectableChannel)channel;
           
            synchronized (selectable.blockingLock()) {
                boolean oldBlocking = selectable.isBlocking();

                SelectionKey key = null;
                try {
                    selectable.configureBlocking(false);
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

    private RubyArray doAcceptNonblock(ThreadContext context, Channel channel) {
        try {
            if (channel instanceof SelectableChannel) {
                SelectableChannel selectable = (SelectableChannel)channel;

                synchronized (selectable.blockingLock()) {
                    boolean oldBlocking = selectable.isBlocking();

                    try {
                        selectable.configureBlocking(false);
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

    public IRubyObject accept_nonblock(ThreadContext context) {
        Ruby runtime = context.runtime;

        SelectableChannel selectable = (SelectableChannel)getChannel();

        synchronized (selectable.blockingLock()) {
            boolean oldBlocking = selectable.isBlocking();

            try {
                selectable.configureBlocking(false);
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

        if (!(channel instanceof SelectableChannel)) {
            throw getRuntime().newErrnoENOPROTOOPTError();
        }

        SelectableChannel selectable = (SelectableChannel)channel;
        synchronized (selectable.blockingLock()) {
            boolean oldBlocking = selectable.isBlocking();
            try {
                selectable.configureBlocking(false);

                try {
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

            throw runtime.newErrnoEAGAINReadableError(channel.getClass().getName() + " does not support nonblocking");
        }

        SelectableChannel selectable = (SelectableChannel)channel;

        synchronized (selectable.blockingLock()) {
            boolean oldBlocking = selectable.isBlocking();

            try {
                selectable.configureBlocking(false);
View Full Code Here

Examples of java.nio.channels.SelectableChannel.blockingLock()

        buffer.flip();

        // For Sockets, only write as much as will fit.
        if (descriptor.getChannel() instanceof SelectableChannel) {
            SelectableChannel selectableChannel = (SelectableChannel)descriptor.getChannel();
            synchronized (selectableChannel.blockingLock()) {
                boolean oldBlocking = selectableChannel.isBlocking();
                try {
                    if (oldBlocking != block) {
                        selectableChannel.configureBlocking(block);
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.