CVS: sml/src/cml/src/core-cml sync-var.sml,1.2,1.3
John Reppy <[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj.commits |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/smlnj/sml/src/cml/src/core-cml
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15454/core-cml
Modified Files:
sync-var.sml
Log Message:
Bug fix: atomic regions not exited by polling operations.
Index: sync-var.sml
===================================================================
RCS file: /cvsroot/smlnj/sml/src/cml/src/core-cml/sync-var.sml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sync-var.sml 1 Jun 2000 18:33:23 -0000 1.2
--- sync-var.sml 4 May 2006 20:17:04 -0000 1.3
***************
*** 177,186 ****
end
! fun iGetPoll (CELL{priority, readQ, value}) = (
! S.atomicBegin();
! case !value
! of NONE => NONE
! | (SOME v) => (S.atomicEnd(); SOME v)
! (* end case *))
--- 177,191 ----
end
! fun iGetPoll (CELL{priority, readQ, value}) = let
! val res = (
! S.atomicBegin();
! case !value
! of NONE => NONE
! | (SOME v) => SOME v
! (* end case *))
! in
! S.atomicEnd();
! res
! end
***************
*** 244,253 ****
end
! fun mTakePoll (CELL{priority, readQ, value}) = (
! S.atomicBegin();
! case !value
! of NONE => NONE
! | (SOME v) => (value := NONE; S.atomicEnd(); SOME v)
! (* end case *))
fun mGet (CELL{priority, readQ, value}) = (
--- 249,262 ----
end
! fun mTakePoll (CELL{priority, readQ, value}) = let
! val res = (
! S.atomicBegin();
! case !value
! of NONE => NONE
! | (SOME v) => (value := NONE; SOME v)
! (* end case *))
! in
! S.atomicEnd(); res
! end
fun mGet (CELL{priority, readQ, value}) = (
***************
*** 337,339 ****
end; (* SyncVar *)
-
--- 346,347 ----
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642