Develop and Download Open Source Software
Login
Create Account
Help
MY OSDN
Find Software
Magazine
Develop
Pastebin
Software
People
PersonalForge
Magazine
Wiki
OSDN
>
Find Software
>
Tweet my On Air SysTem
Summary
Project Summary
Developer Dashboard
Project Reviews
Web Page
Developers
List of RSS Feeds
Statistics
History
Image Gallery
Search Keywords
News
Listed News
Help
Downloads
List of Releases
Help
Source Code
Guide
Browse SVN
Help
Wiki
FrontPage
Title index
Recent changes
Wiki Search
Help
Forums
List of Forums
バグ報告 (1)
ヘルプ (1)
その他 (1)
Help
Mailing Lists
list of ML
Help
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Help
Browse Subversion Repository
/
[toast]
/
branches
/
ProcessWatchImpl
/
Muffin
/
OriginalAlertApiReceiever.cs
Diff of /branches/ProcessWatchImpl/Muffin/OriginalAlertApiReceiever.cs
Parent Directory
|
Revision Log
|
Patch
revision
43
by
netseed
, Fri Dec 11 17:21:35 2009 UTC
revision
44
by
netseed
, Tue Dec 15 16:20:54 2009 UTC
#
Line 24
namespace Toast.NicoNico
Line 24
namespace Toast.NicoNico
24
private static readonly TimeSpan RecoverShortDelay = new TimeSpan(0, 0, 10);
private static readonly TimeSpan RecoverShortDelay = new TimeSpan(0, 0, 10);
25
private static readonly int RetryThreshold = 2;
private static readonly int RetryThreshold = 2;
26
27
private AutoResetEvent DelayGate_;
private AutoResetEvent delayGate;
28
private int TryCount_;
private int tryCount;
29
30
public DelayController()
public DelayController()
31
{
{
32
DelayGate_ = new AutoResetEvent(false);
delayGate = new AutoResetEvent(false);
33
TryCount_ = 0;
tryCount = 0;
34
}
}
35
36
public void WaitOne()
public void WaitOne()
37
{
{
38
lock (DelayGate_)
lock (delayGate)
39
{
{
40
if (++TryCount_ > RetryThreshold)
if (++tryCount > RetryThreshold)
41
{
{
42
DelayGate_.WaitOne(RecoverLongDelay);
delayGate.WaitOne(RecoverLongDelay);
43
}
}
44
else
else
45
{
{
46
DelayGate_.WaitOne(RecoverShortDelay);
delayGate.WaitOne(RecoverShortDelay);
47
}
}
48
}
}
49
}
}
50
51
public void ResetCount()
public void ResetCount()
52
{
{
53
lock (DelayGate_)
lock (delayGate)
54
{
{
55
TryCount_ = 0;
tryCount = 0;
56
}
}
57
}
}
58
59
public void Dispose()
public void Dispose()
60
{
{
61
DelayGate_.Close();
delayGate.Close();
62
GC.SuppressFinalize(this);
GC.SuppressFinalize(this);
63
}
}
64
}
}
#
Line 298
namespace Toast.NicoNico
Line 298
namespace Toast.NicoNico
298
uint UID = 0;
uint UID = 0;
299
if (uint.TryParse(Splitter.Replace(Source, "${user}"), out UID))
if (uint.TryParse(Splitter.Replace(Source, "${user}"), out UID))
300
{
{
301
if (this.MyId == UID)
if (MyId == UID)
302
{
{
303
304
//Console.WriteLine(UID);
//Console.WriteLine(UID);
#
Line 381
namespace Toast.NicoNico
Line 381
namespace Toast.NicoNico
381
382
lock (syncRoot)
lock (syncRoot)
383
{
{
384
this.status = e.Current;
status = e.Current;
385
}
}
386
}
}
387
Colored Diff
Long Colored Diff
Full Colored Diff
Unidiff
Context Diff
Side by Side
Legend:
Removed from v.43
changed lines
Added in v.44
Back to OSDN
">
Back to OSDN
ViewVC Help
Powered by
ViewVC 1.1.26