langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1,31 @@
MustInherit Class PhilosopherBase
Implements IDisposable
Protected m_Disposed As Boolean
Protected ReadOnly m_Left As Fork
Protected ReadOnly m_Right As Fork
Protected ReadOnly m_Name As String
Public Sub New(ByVal name As String, ByVal right As Fork, ByVal left As Fork)
m_Name = name
m_Right = right
m_Left = left
Dim t As New Thread(AddressOf MainLoop)
t.IsBackground = True
t.Start()
End Sub
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
m_Disposed = True
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
Public ReadOnly Property Name() As String
Get
Return m_Name
End Get
End Property
Public MustOverride Sub MainLoop()
End Class