summaryrefslogtreecommitdiff
path: root/vb/demo/Ice/async/WorkQueue.vb
diff options
context:
space:
mode:
authorBrent Eagles <brent@zeroc.com>2007-11-07 14:59:34 -0330
committerBrent Eagles <brent@zeroc.com>2007-11-07 14:59:34 -0330
commit676286717393ad5a1dfecac80022ce85cd503711 (patch)
treefbf5f846218fcac6de115bea01fe1572d309d0c2 /vb/demo/Ice/async/WorkQueue.vb
parent- Fixing bug 2522 for Python. This involved adding the C++ class (diff)
downloadice-676286717393ad5a1dfecac80022ce85cd503711.tar.bz2
ice-676286717393ad5a1dfecac80022ce85cd503711.tar.xz
ice-676286717393ad5a1dfecac80022ce85cd503711.zip
- Moved cpp/slice to slice
- Merged all TestUtil.py modules to config/TestUtil.py - Moved all certs to config/certs - Updated test scripts to refer to new TestUtil.py module and use new interfaces - Updated build systems to refer to new slice location - Moved cpp/install to distribution - Moved and merged all IceGridAdmin.py modules to config. - Modified build system to deal with new build logic. That is there are 3 basic ways to find the slice translators and runtime: ICE_HOME, an RPM install and the source distribution. Automatically detecting Ice in a default install location is now problematic and no longer done.
Diffstat (limited to 'vb/demo/Ice/async/WorkQueue.vb')
-rwxr-xr-xvb/demo/Ice/async/WorkQueue.vb84
1 files changed, 0 insertions, 84 deletions
diff --git a/vb/demo/Ice/async/WorkQueue.vb b/vb/demo/Ice/async/WorkQueue.vb
deleted file mode 100755
index d42d099ebb1..00000000000
--- a/vb/demo/Ice/async/WorkQueue.vb
+++ /dev/null
@@ -1,84 +0,0 @@
-' **********************************************************************
-'
-' Copyright (c) 2003-2007 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.
-'
-' **********************************************************************
-
-Imports Demo
-Imports System
-Imports System.Collections
-Imports System.Threading
-
-Public Class WorkQueue
-
- Private Class CallbackEntry
- Public cb As AMD_Hello_sayHello
- Public delay As Integer
- End Class
-
- Public Sub Join()
- _thread.Join()
- End Sub
-
- Public Sub Start()
- _thread = New Thread(New ThreadStart(AddressOf Me.Run))
- _thread.Start()
- End Sub
-
- Public Sub Run()
- SyncLock Me
- While Not _done
- If _callbacks.Count = 0 Then
- Monitor.Wait(Me)
- End If
-
- If Not _callbacks.Count = 0 Then
- Dim entry As CallbackEntry = _callbacks(0)
- Monitor.Wait(Me, entry.delay)
-
- If Not _done Then
- _callbacks.RemoveAt(0)
- Console.WriteLine("Belated Hello World!")
- entry.cb.ice_response()
- End If
- End If
- End While
-
- Dim e As CallbackEntry
- For Each e In _callbacks
- e.cb.ice_exception(New RequestCanceledException())
- Next
- End SyncLock
- End Sub
-
- Public Sub Add(ByVal cb As AMD_Hello_sayHello, ByVal delay As Integer)
- SyncLock Me
- If Not _done Then
- Dim entry As CallbackEntry = New CallbackEntry
- entry.cb = cb
- entry.delay = delay
-
- If _callbacks.Count = 0 Then
- Monitor.Pulse(Me)
- End If
- _callbacks.Add(entry)
- Else
- cb.ice_exception(New RequestCanceledException())
- End If
- End SyncLock
- End Sub
-
- Public Sub destroy()
- SyncLock Me
- _done = True
- Monitor.Pulse(Me)
- End SyncLock
- End Sub
-
- Private _thread As Thread
- Private _done As Boolean
- Private _callbacks As ArrayList = New ArrayList
-End Class