Exemple #1
0
        public void reg5()
        {
            // this.notify != null
            PlainMailbox mb = new PlainMailbox(this, 1L);

            mb.RegisterNotify(notify, null, 0);
            mb.RegisterNotify(notify1x, null, 0);
        }
Exemple #2
0
        public void unreg4()
        {
            PlainMailbox mb = new PlainMailbox(this, 1L);

            mb.RegisterNotify(notify, null, 0);
            mb.UnregisterNotify(notify);
            mb.RegisterNotify(notify, null, 0);
            mb.UnregisterNotify(notify);
            mb.RegisterNotify(notify1x, null, 0);
            mb.UnregisterNotify(notify1x);
        }
Exemple #3
0
        public void reg2()
        {
            // maxDelay < 0
            PlainMailbox mb = new PlainMailbox(this, 1L);

            mb.RegisterNotify(notify, null, -1);
        }
Exemple #4
0
        public void reg1()
        {
            // notify == null
            PlainMailbox mb = new PlainMailbox(this, 1L);

            mb.RegisterNotify(null, null, 0);
        }
Exemple #5
0
        public void unreg5()
        {
            // notify != this.notify
            PlainMailbox mb = new PlainMailbox(this, 1L);

            mb.RegisterNotify(notify, null, 0);
            mb.UnregisterNotify(notify1x);
        }
Exemple #6
0
        public void notify4()
        {
            PlainMailbox mb = new PlainMailbox(this, 1L);

            notify.checkMailboxStatus(false, null, null, false);

            Object state = new Object();

            mb.RegisterNotify(notify, state, 0);
            notify.checkMailboxStatus(false, null, null, false);

            mb.Message(alice_who, foo_msg);
            notify.checkMailboxStatus(true, mb, state, false);
        }
Exemple #7
0
        public void notify3()
        {
            PlainMailbox mb = new PlainMailbox(this, 1L);

            notify.checkMailboxStatus(false, null, null, false);

            Object state = new Object();

            mb.RegisterNotify(notify, state, 0);
            notify.checkMailboxStatus(false, null, null, false);

            Thread.Sleep(2000);
            notify.checkMailboxStatus(false, null, null, false);
        }
Exemple #8
0
        public void notify1()
        {
            PlainMailbox mb = new PlainMailbox(this, 1L);

            notify.checkMailboxStatus(false, null, null, false);

            Object state = new Object();

            mb.RegisterNotify(notify, state, 0);
            notify.checkMailboxStatus(false, null, null, false);

            checkCloseDelivery(mb, true);
            notify.checkMailboxStatus(true, mb, state, true);
        }
Exemple #9
0
        public void reg3()
        {
            PlainMailbox mb = new PlainMailbox(this, 1L);

            mb.RegisterNotify(notify, null, 0);
        }