Update of /cvsroot/radmind/radmind-assistant
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26210
Modified Files:
RCMStepController.m
Log Message:
Eliminate unnecessary locking. Distributed Objects are protection enough.
Index: RCMStepController.m
===================================================================
RCS file: /cvsroot/radmind/radmind-assistant/RCMStepController.m,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** RCMStepController.m 27 Oct 2006 02:44:31 -0000 1.108
--- RCMStepController.m 17 Jun 2008 00:13:10 -0000 1.109
***************
*** 51,54 ****
--- 51,55 ----
[ NSDictionary dictionaryWithObject:
[ NSNumber numberWithBool: YES ] forKey:@"RACaseInsensitive" ]];
+ [[ NSUserDefaults standardUserDefaults ] synchronize ];
[ super initialize ];
***************
*** 1490,1494 ****
- ( oneway void )updateProgress: ( NSString * )progressString
{
- NSLock *lock = nil;
char progress[ LINE_MAX ];
char **targv;
--- 1491,1494 ----
***************
*** 1500,1512 ****
}
- lock = [[ NSLock alloc ] init ];
- if ( ! [ lock tryLock ] ) {
- if ( lock ) {
- [ lock release ];
- }
- NSLog( @"Couldn't set lock!" );
- return;
- }
-
( void )strlcpy( progress, [ progressString UTF8String ],
sizeof( progress ));
--- 1500,1503 ----
***************
*** 1514,1518 ****
if (( tac = argcargv( progress, &targv )) < 1 ) {
NSLog( @"%@: not a progress string", progressString );
- [ lock release ];
return;
}
--- 1505,1508 ----
***************
*** 1523,1527 ****
if ( errno == ERANGE ) {
NSLog( @"strtod %s: %s", targv[ 0 ], strerror( errno ));
- [ lock release ];
return;
}
--- 1513,1516 ----
***************
*** 1536,1543 ****
[ toolProgBar setMaxValue: 100.0 ];
[ toolProgBar setDoubleValue: pct ];
-
- if ( lock ) {
- [ lock release ];
- }
}
--- 1525,1528 ----
***************
*** 1770,1785 ****
displayInPane: ( BOOL )display
{
- NSLock *lock = nil;
NSMutableAttributedString *attr = nil;
- lock = [[ NSLock alloc ] init ];
-
- if ( ! [ lock tryLock ] ) {
- NSLog( @"Couldn't set lock" );
- if ( lock != nil ) {
- [ lock release ];
- }
- }
-
attr = [[ NSMutableAttributedString alloc ] initWithString: text ];
--- 1755,1760 ----
***************
*** 1801,1808 ****
[ attr release ];
[ toolsLogField setEditable: NO ];
-
- if ( lock != nil ) {
- [ lock release ];
- }
}
--- 1776,1779 ----
|