]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/concurrency/promises/promises-docs.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / concurrency / promises / promises-docs.factor
index 9760d842dca97ccbc9f81e7b6e879b37d99f2d98..49d7360fe886a7347c93ba3d5786517082e15a0b 100644 (file)
@@ -1,41 +1,41 @@
-! Copyright (C) 2005, 2008 Chris Double, Slava Pestov.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: calendar help.markup help.syntax kernel ;\r
-IN: concurrency.promises\r
-\r
-HELP: promise\r
-{ $class-description "The class of write-once promises." } ;\r
-\r
-HELP: <promise>\r
-{ $values { "promise" promise } }\r
-{ $description "Creates a new promise which may be fulfilled by calling " { $link fulfill } "." } ;\r
-\r
-HELP: promise-fulfilled?\r
-{ $values { "promise" promise } { "?" boolean } }\r
-{ $description "Tests if " { $link fulfill } " has previously been called on the promise, in which case " { $link ?promise } " will return immediately without blocking." } ;\r
-\r
-HELP: ?promise-timeout\r
-{ $values { "promise" promise } { "timeout" { $maybe duration } } { "result" object } }\r
-{ $description "Waits for another thread to fulfill a promise, returning immediately if the promise has already been fulfilled. A timeout of " { $link f } " indicates that the thread may block indefinitely, otherwise it will wait up to the " { $snippet "timeout" } " before throwing an error." }\r
-{ $errors "Throws an error if the timeout expires before the promise has been fulfilled." } ;\r
-\r
-HELP: ?promise\r
-{ $values { "promise" promise } { "result" object } }\r
-{ $description "Waits for another thread to fulfill a promise, returning immediately if the promise has already been fulfilled." } ;\r
-\r
-HELP: fulfill\r
-{ $values { "value" object } { "promise" promise } }\r
-{ $description "Fulfills a promise by writing a value to it. Any threads waiting for the value are notified." }\r
-{ $errors "Throws an error if the promise has already been fulfilled." } ;\r
-\r
-ARTICLE: "concurrency.promises" "Promises"\r
-"The " { $vocab-link "concurrency.promises" } " vocabulary implements " { $emphasis "promises" } ", which are thread-safe write-once variables. Once a promise is created, threads may block waiting for it to be " { $emphasis "fulfilled" } "; at some point in the future, another thread may provide a value at which point all waiting threads are notified."\r
-{ $subsections\r
-    promise\r
-    <promise>\r
-    fulfill\r
-    ?promise\r
-    ?promise-timeout\r
-} ;\r
-\r
-ABOUT: "concurrency.promises"\r
+! Copyright (C) 2005, 2008 Chris Double, Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: calendar help.markup help.syntax kernel ;
+IN: concurrency.promises
+
+HELP: promise
+{ $class-description "The class of write-once promises." } ;
+
+HELP: <promise>
+{ $values { "promise" promise } }
+{ $description "Creates a new promise which may be fulfilled by calling " { $link fulfill } "." } ;
+
+HELP: promise-fulfilled?
+{ $values { "promise" promise } { "?" boolean } }
+{ $description "Tests if " { $link fulfill } " has previously been called on the promise, in which case " { $link ?promise } " will return immediately without blocking." } ;
+
+HELP: ?promise-timeout
+{ $values { "promise" promise } { "timeout" { $maybe duration } } { "result" object } }
+{ $description "Waits for another thread to fulfill a promise, returning immediately if the promise has already been fulfilled. A timeout of " { $link f } " indicates that the thread may block indefinitely, otherwise it will wait up to the " { $snippet "timeout" } " before throwing an error." }
+{ $errors "Throws an error if the timeout expires before the promise has been fulfilled." } ;
+
+HELP: ?promise
+{ $values { "promise" promise } { "result" object } }
+{ $description "Waits for another thread to fulfill a promise, returning immediately if the promise has already been fulfilled." } ;
+
+HELP: fulfill
+{ $values { "value" object } { "promise" promise } }
+{ $description "Fulfills a promise by writing a value to it. Any threads waiting for the value are notified." }
+{ $errors "Throws an error if the promise has already been fulfilled." } ;
+
+ARTICLE: "concurrency.promises" "Promises"
+"The " { $vocab-link "concurrency.promises" } " vocabulary implements " { $emphasis "promises" } ", which are thread-safe write-once variables. Once a promise is created, threads may block waiting for it to be " { $emphasis "fulfilled" } "; at some point in the future, another thread may provide a value at which point all waiting threads are notified."
+{ $subsections
+    promise
+    <promise>
+    fulfill
+    ?promise
+    ?promise-timeout
+} ;
+
+ABOUT: "concurrency.promises"