Example #1
0
        /// <summary>
        /// Remove any pending posts of Runnable <var>r</var> with Object
        /// <var>token</var> that are in the message queue.  If <var>token</var> is null,
        /// all callbacks will be removed.
        /// </summary>
        public void RemoveCallbacks(Runnable r, Object token)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final WeakRunnable runnable = mRunnables.remove(r);
            WeakRunnable runnable = mRunnables.remove(r);

            if (runnable != null)
            {
                mExec.RemoveCallbacks(runnable, token);
            }
        }
Example #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: public ChainedRef(@NonNull java.util.concurrent.locks.ILock lock, @NonNull Runnable r)
            public ChainedRef(ILock @lock, IRunnable r)
            {
                this.runnable = r;
                this.@lock    = @lock;
                this.wrapper  = new WeakRunnable(new WeakReference((Runnable)r), new WeakReference(this));
            }