Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Dekorte authored and Stephen Dekorte committed Apr 15, 2010
1 parent 3974e42 commit 5472169
Show file tree
Hide file tree
Showing 202 changed files with 100 additions and 20,314 deletions.
92 changes: 0 additions & 92 deletions addons/AppleExtras/Makefile

This file was deleted.

7 changes: 0 additions & 7 deletions addons/AppleExtras/build.io

This file was deleted.

6 changes: 4 additions & 2 deletions build/Project.io
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ Project := Object clone do(
folder := Directory clone setPath(name)
if(folder exists not, return List clone)
subfolders := folder directories
subfolders selectInPlace(fileNamedOrNil("build.io"))
//subfolders selectInPlace(fileNamedOrNil("build.io"))
subfolders selectInPlace(directoryNamed("build") fileNamedOrNil("build.io"))
subfolders map(f,
module := Lobby doString(f fileNamedOrNil("build.io") contents)
//module := Lobby doString(f fileNamedOrNil("build.io") contents)
module := Lobby doString(f directoryNamed("build") fileNamedOrNil("build.io") contents)
module folder setPath(f path)
module
)
Expand Down
32 changes: 9 additions & 23 deletions docs/IoGuide.html
Original file line number Diff line number Diff line change
Expand Up @@ -1445,14 +1445,14 @@ <h3>Actors</h3>
</td><td></td><td>


An actor is an object with its own thread (in our case, its own coroutine) which it uses to process its queue of asynchronous messages. Any object in Io can be sent an asynchronous message by placing a @ or @@ before the message name. (think of the "a" in @ as standing for "asynchronous")
An actor is an object with its own thread (in our case, its own coroutine) which it uses to process its queue of asynchronous messages. Any object in Io can be sent an asynchronous message by placing using the asyncSend() or futureSend() messages.
<p>
Example:
Examples:

<pre>
result := self foo // synchronous
futureResult := self @foo // async, immediately returns a Future
self @@foo // async, immediately returns nil
futureResult := self futureSend(foo) // async, immediately returns a Future
self asyncSend(foo) // async, immediately returns nil
</pre>

When an object receives an asynchronous message it puts the message in its queue and, if it doesn't already have one, starts a coroutine to process the messages in its queue. Queued messages are processed sequentially in a first-in-first-out order. Control can be yielded to other coroutines by calling "yield". Example:
Expand All @@ -1461,7 +1461,7 @@ <h3>Actors</h3>
obj1 := Object clone
obj1 test := method(for(n, 1, 3, n print; yield))
obj2 := obj1 clone
obj1 @@test; obj2 @@test
obj1 asyncSend(test); obj2 asyncSend(test)
while(Scheduler yieldingCoros size > 1, yield)
</pre>

Expand All @@ -1471,7 +1471,7 @@ <h3>Actors</h3>

<pre>
HttpServer handleRequest := method(aSocket,
HttpRequestHandler clone @@handleRequest(aSocket)
HttpRequestHandler clone asyncSend(handleRequest(aSocket))
)
</pre>

Expand All @@ -1490,35 +1490,21 @@ <h4>Auto Deadlock Detection</h4>

An advantage of using futures is that when a future requires a wait, it will check to see if pausing to wait for the result would cause a deadlock and if so, avoid the deadlock and raise an exception. It performs this check by traversing the list of connected futures.

<h4>The @ and @@ Operators</h4>

The @ or @@ before an asynchronous message is just a normal operator message. So:

<pre>
self @test
</pre>

Gets parsed as(and can be written as):

<pre>
self @(test)
</pre>

<h4>Futures and the Command Line Interface</h4>

The command line will attempt to print the result of expressions evaluated in it, so if the result is a Future, it will attempt to print it and this will wait on the result of Future. Example:

<pre>
Io> q := method(wait(1))
Io> @q
Io> futureSend(q)
[1-second delay]
==> nil
</pre>

To avoid this, just make sure the Future isn't the result. Example:

<pre>
Io> @q; nil
Io> futureSend(q); nil
[no delay]
==> nil
</pre>
Expand Down Expand Up @@ -2143,7 +2129,7 @@ <h3>Networking</h3>
WebServer := Server clone do(
setPort(8000)
handleSocket := method(aSocket,
WebRequest clone @handleSocket(aSocket)
WebRequest clone asyncSend(handleSocket(aSocket))
)
)

Expand Down
12 changes: 10 additions & 2 deletions docs/reference/Apple/AppleExtras/AppleSensors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@
<body>

<br>
<h1>AppleSensors Proto</h1>
<br><br><br><br><br><br>
<h1>Io Reference</h1>
<br><br><br>
<br><br>
<a class='column' href='../../index.html'>Apple</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<a class='column' href='../index.html'>AppleExtras</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<b>AppleSensors</b>
<br><br><br>
<br><br><br>
<table border=0 cellspacing=0 style="margin-left:8em; width:40em; line-height:1.2em;">
<tr>
<td align=right></td>
Expand Down
149 changes: 0 additions & 149 deletions docs/reference/Audio/LibSndFile/LibSndFile/index.html

This file was deleted.

0 comments on commit 5472169

Please sign in to comment.