File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
TeamCity.ServiceMessages/Write/Special/Impl Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 1616
1717namespace JetBrains . TeamCity . ServiceMessages . Write . Special . Impl
1818{
19- using System ;
2019 using System . Globalization ;
2120 using System . Threading ;
2221
@@ -25,22 +24,14 @@ namespace JetBrains.TeamCity.ServiceMessages.Write.Special.Impl
2524 /// </summary>
2625 public class DefaultFlowIdGenerator : IFlowIdGenerator
2726 {
28- private int _ids ;
27+ private static long ourIds ;
2928
3029 /// <summary>
3130 /// Generates new unique FlowId
3231 /// </summary>
3332 public string NewFlowId ( )
3433 {
35- return (
36- #if ! NET35 && ! NET40
37- Interlocked . Increment ( ref _ids )
38- #else
39- Interlocked . Increment ( ref _ids ) << ( 27
40- + ( Thread . CurrentThread . ManagedThreadId << 21 )
41- + Environment . TickCount % int . MaxValue )
42- #endif
43- ) . ToString ( CultureInfo . InvariantCulture ) ;
34+ return Interlocked . Increment ( ref ourIds ) . ToString ( CultureInfo . InvariantCulture ) ;
4435 }
4536 }
4637}
You can’t perform that action at this time.
0 commit comments