Skip to content

Commit d7daae1

Browse files
Cleanup of README
1 parent b9ee477 commit d7daae1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This extension library removes the tediousness of properly acquiring and releasi
1919
### Read
2020

2121
```cs
22-
rwLockSlim.Read(()=>
22+
rwLockSlim.Read(() =>
2323
{
2424
/* do work inside a read lock */
2525
});
@@ -33,7 +33,7 @@ using(rwLockSlim.ReadLock())
3333
```
3434

3535
```cs
36-
int result = rwLockSlim.Read(()=>
36+
int result = rwLockSlim.Read(() =>
3737
{
3838
int i;
3939
/* produce a result inside read lock */
@@ -46,7 +46,7 @@ int result = rwLockSlim.Read(()=>
4646
### Write
4747

4848
```cs
49-
rwLockSlim.Write(()=>
49+
rwLockSlim.Write(() =>
5050
{
5151
/* do work inside a read lock */
5252
});
@@ -60,7 +60,7 @@ using(rwLockSlim.WriteLock())
6060
```
6161

6262
```cs
63-
int result = rwLockSlim.Write(()=>
63+
int result = rwLockSlim.Write(() =>
6464
{
6565
int i;
6666
/* produce a result inside write lock */
@@ -96,7 +96,7 @@ These throw a `TimeoutException` if a lock cannot be acquired within the time sp
9696
### Read
9797

9898
```cs
99-
rwLockSlim.Read(1000 /* ms */, ()=>
99+
rwLockSlim.Read(1000 /* ms */, () =>
100100
{
101101
/* do work inside a read lock */
102102
});
@@ -116,7 +116,7 @@ using(rwLockSlim.ReadLock(1000)) // ms
116116
### Write
117117

118118
```cs
119-
rwLockSlim.Write(1000 /* ms */, ()=>
119+
rwLockSlim.Write(1000 /* ms */, () =>
120120
{
121121
/* do work inside a write lock */
122122
});
@@ -141,8 +141,8 @@ This example demonstrates how to properly query a value before writing with a 1
141141

142142
```cs
143143
var actionWasInvoked = rwLockSlim.WriteConditional(1000 /* ms */,
144-
()=> /* condition that is queried inside an upgradable read lock */,
145-
()=> /* do work inside a write lock */);
144+
() => /* condition that is queried inside an upgradable read lock */,
145+
() => /* do work inside a write lock */);
146146
```
147147

148148
### ReadWriteConditional
@@ -153,7 +153,7 @@ This more advanced example optimizes the process of reading and then writing by
153153
int result = 0;
154154
bool actionWasInvoked = rwLockSlim.ReadWriteConditional(ref result,
155155
isUpgraded => /* condition that is first queried inside a read lock */,
156-
()=>
156+
() =>
157157
{
158158
int i;
159159
/* do work inside a write lock */

0 commit comments

Comments
 (0)