CVS: sml/src/cml/src/core-cml sync-var.sml,1.3,1.4
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-cvs8.sourceforge.net:/tmp/cvs-serv7349/src/core-cml
Modified Files:
sync-var.sml
Log Message:
Bug fix for iGetPoll, mTakePoll, and mGetPoll.
Index: sync-var.sml
===================================================================
RCS file: /cvsroot/smlnj/sml/src/cml/src/core-cml/sync-var.sml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sync-var.sml 4 May 2006 20:17:04 -0000 1.3
--- sync-var.sml 17 May 2006 14:45:48 -0000 1.4
***************
*** 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
--- 177,184 ----
end
! (* NOTE: we assume that reads are atomic, so this function does not
! * need to run in an atomic region.
! *)
! fun iGetPoll (CELL{value, ...}) = !value
***************
*** 295,304 ****
end
! fun mGetPoll (CELL{priority, readQ, value}) = (
! S.atomicBegin();
! case !value
! of NONE => NONE
! | (SOME v) => (S.atomicEnd(); SOME v)
! (* end case *))
(* Swap the current contents of the cell with a new value. This function
--- 288,295 ----
end
! (* NOTE: we assume that reads are atomic, so this function does not
! * need to run in an atomic region.
! *)
! fun mGetPoll (CELL{value, ...}) = !value
(* Swap the current contents of the cell with a new value. This function
-------------------------------------------------------
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