Changeset 435 for trunk/Include/Classes/System/Console.ab
- Timestamp:
- Feb 28, 2008, 1:39:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Console.ab
r432 r435 36 36 */ 37 37 Static Function ReadLine() As String 38 ReadLine = in.ReadLine() 38 Dim lock = enter() 39 Try 40 ReadLine = in.ReadLine() 41 Finally 42 lock.Leave() 43 End Try 44 End Function 45 46 /* 47 @brief 標準入力から1行読み込む 48 @date 2008/02/26 49 @auther Egtra 50 */ 51 Static Function Read() As Long 52 Dim lock = enter() 53 Try 54 Read = in.Read() 55 Finally 56 lock.Leave() 57 End Try 39 58 End Function 40 59 Private 60 Function enter() As ActiveBasic.Windows.CriticalSectionLock 61 Imports ActiveBasic.Windows 62 If ActiveBasic.IsNothing(cs) Then 63 Dim lock = New CriticalSectionLock(_System_CriticalSection) 64 Try 65 If ActiveBasic.IsNothing(cs) Then 66 cs = New CriticalSection 67 End If 68 Finally 69 lock.Dispose() 70 End Try 71 End If 72 enter = cs.Enter 73 End Function 74 41 75 Static in = Nothing As IO.TextReader 76 Static cs = Nothing As ActiveBasic.Windows.CriticalSection 42 77 End Class 43 78
Note:
See TracChangeset
for help on using the changeset viewer.