[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading ISignal.cs,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading ISignal.cs,NONE,1.1 AutoResetEvent.cs,1.2,1.3 ManualResetEvent.cs,1.2,1.3Timer.cs,1.5,1.6 |
Date: |
Tue, 01 Apr 2003 19:04:56 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading
In directory subversions:/tmp/cvs-serv14026/runtime/System/Threading
Modified Files:
AutoResetEvent.cs ManualResetEvent.cs Timer.cs
Added Files:
ISignal.cs
Log Message:
Add the internal "ISignal" interface to mark wait handles that
implement signalling; use "ISignal" to perform dispose notifies in "Timer".
--- NEW FILE ---
/*
* ISignal.cs - Implementation of the "System.Threading.ISignal" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Threading
{
// This interface is implemented by wait handles that support
// signalling functionality.
internal interface ISignal
{
void Signal();
}; // class ISignal
}; // namespace System.Threading
Index: AutoResetEvent.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading/AutoResetEvent.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** AutoResetEvent.cs 1 Apr 2003 22:15:28 -0000 1.2
--- AutoResetEvent.cs 2 Apr 2003 00:04:54 -0000 1.3
***************
*** 30,35 ****
/// See ECMA specs.
/// </summary>
! public sealed class AutoResetEvent
! : WaitHandle
{
/// <summary>
--- 30,34 ----
/// See ECMA specs.
/// </summary>
! public sealed class AutoResetEvent : WaitHandle, ISignal
{
/// <summary>
***************
*** 59,62 ****
--- 58,67 ----
{
return WaitEvent.InternalResetEvent(Handle);
+ }
+
+ // Implement the ISignal interface.
+ void ISignal.Signal()
+ {
+ Set();
}
}
Index: ManualResetEvent.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading/ManualResetEvent.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ManualResetEvent.cs 1 Apr 2003 22:15:28 -0000 1.2
--- ManualResetEvent.cs 2 Apr 2003 00:04:54 -0000 1.3
***************
*** 32,36 ****
public
#endif
! sealed class ManualResetEvent : WaitHandle
{
/// <summary>
--- 32,36 ----
public
#endif
! sealed class ManualResetEvent : WaitHandle, ISignal
{
/// <summary>
***************
*** 60,63 ****
--- 60,69 ----
{
return WaitEvent.InternalResetEvent(Handle);
+ }
+
+ // Implement the ISignal interface.
+ void ISignal.Signal()
+ {
+ Set();
}
}
Index: Timer.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading/Timer.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Timer.cs 1 Apr 2003 22:28:41 -0000 1.5
--- Timer.cs 2 Apr 2003 00:04:54 -0000 1.6
***************
*** 330,336 ****
}
}
! if(notifyObject != null)
{
! // TODO: signal notifyObject
that we are exiting.
}
}
--- 330,339 ----
}
}
!
! // Signal the "notifyObject" to
indicate "disposed".
! ISignal signal = (notifyObject as
ISignal);
! if(signal != null)
{
! signal.Signal();
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading ISignal.cs,NONE,1.1 AutoResetEvent.cs,1.2,1.3 ManualResetEvent.cs,1.2,1.3Timer.cs,1.5,1.6,
Rhys Weatherley <address@hidden> <=