<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://otl.17slon.com/book/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://otl.17slon.com/book/feed.php">
        <title>OmniThreadLibrary book</title>
        <description></description>
        <link>http://otl.17slon.com/book/</link>
        <image rdf:resource="http://otl.17slon.com/book/lib/tpl/arctic-mbo/images/favicon.ico" />
       <dc:date>2013-05-25T23:35:49-04:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:highlevel:asyncawait&amp;rev=1362554521&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=sidebar&amp;rev=1362554508&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:synch:initialization&amp;rev=1362554336&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:synch:inversesemaphore&amp;rev=1362554322&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:synch:waitablevalue&amp;rev=1362554303&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:synch:cancellation_token&amp;rev=1362554291&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:synch:tomnimrew&amp;rev=1362554275&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:synch:criticalsections&amp;rev=1362554258&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:synch&amp;rev=1362554239&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:highlevel:forkjoin&amp;rev=1362553978&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:highlevel:foreach&amp;rev=1362553942&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:demos&amp;rev=1352914840&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:howto:com&amp;rev=1352914729&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Acheckvat.png&amp;ns=book%3Ahowto&amp;rev=1352914715&amp;tab_details=history&amp;mediado=diff&amp;do=media"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:howto:databases&amp;rev=1352914690&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Ahowto-database.png&amp;ns=book%3Ahowto&amp;rev=1352914590&amp;tab_details=history&amp;mediado=diff&amp;do=media"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Atwofish.png&amp;ns=book%3Ahowto&amp;rev=1352914558&amp;tab_details=history&amp;mediado=diff&amp;do=media"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Afishfacts.png&amp;ns=book%3Ahowto&amp;rev=1352914516&amp;tab_details=history&amp;mediado=diff&amp;do=media"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?id=book:howto:multiframe&amp;rev=1352914482&amp;do=diff"/>
                <rdf:li rdf:resource="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Aframedworkers.png&amp;ns=book%3Ahowto&amp;rev=1352914461&amp;tab_details=history&amp;mediado=diff&amp;do=media"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://otl.17slon.com/book/lib/tpl/arctic-mbo/images/favicon.ico">
        <title>OmniThreadLibrary book</title>
        <link>http://otl.17slon.com/book/</link>
        <url>http://otl.17slon.com/book/lib/tpl/arctic-mbo/images/favicon.ico</url>
    </image>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:highlevel:asyncawait&amp;rev=1362554521&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:22:01-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:highlevel:asyncawait - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:highlevel:asyncawait&amp;rev=1362554521&amp;do=diff</link>
        <description>Async/Await is a simplified version of the Async abstraction which mimics the .NET Async/Await mechanism.[^async-await-more]

[^async-await-more]: Read more at &lt;&lt;http://www.thedelphigeek.com/2012/07/asyncawait-in-delphi.html&gt;&gt;.

In short, Async/Await accepts two parameterless anonymous methods. The first one is executed in a background thread and the second one is executed in the main thread after the background thread has completed its work.</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=sidebar&amp;rev=1362554508&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:21:48-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>sidebar</title>
        <link>http://otl.17slon.com/book/doku.php?id=sidebar&amp;rev=1362554508&amp;do=diff</link>
        <description>*  Credits
	*  Introduction
		*  Advertisement

	*  Introduction to Multithreading
		*  About
		*  Why Multithreading
		*  When not to Multithread
		*  Guidelines
			*  Think about the algorithm
			*  Think about the interaction points between threads
				*  Sending millions and millions of messages is bad
				*  Banging on a critical section is bad
				*  Hitting memory manager thousand times a second is bad</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:synch:initialization&amp;rev=1362554336&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:18:56-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:synch:initialization - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:synch:initialization&amp;rev=1362554336&amp;do=diff</link>
        <description>Initializing an object in a multithreaded world is not a problem -- if the object is initialized in the context of a single thread. To put this into a simple language -- everything is fine, if we can initialize object first and then pass it to multiple tasks.[^sync-init-single-task] In most cases, this is not a problem, but sometimes we want to pass an object to multiple tasks and then create it in one of the tasks (typically, in the first task that will want to use the object). While this may l…</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:synch:inversesemaphore&amp;rev=1362554322&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:18:42-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:synch:inversesemaphore - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:synch:inversesemaphore&amp;rev=1362554322&amp;do=diff</link>
        <description>A semaphore is a counting synchronisation object that starts at some value (typically greater than 0) which usually represents a number of available resources of some kind. To allocate a semaphore, one waits on it. If the semaphore count is greater than zero, the semaphore is signalled, wait will succeed and semaphore count gets decremented by one. [Of course, all of this occurs atomically.] If the semaphore count is zero, the semaphore is not signalled and wait will block until the timeout or u…</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:synch:waitablevalue&amp;rev=1362554303&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:18:23-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:synch:waitablevalue - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:synch:waitablevalue&amp;rev=1362554303&amp;do=diff</link>
        <description>The communication framework in the OmniThreadLibrary works asynchronously (you cannot know when a task or owner will receive and process the message). Most of the time that functions great, but sometimes you have to process messages synchronously (that is, you want to wait until the task processes the message) because otherwise the code gets too complicated. For those situations, OmniThreadLibrary offers a waitable value TOmniWaitableValue, which is also exposed as an interface IOmniWaitableValu…</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:synch:cancellation_token&amp;rev=1362554291&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:18:11-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:synch:cancellation_token - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:synch:cancellation_token&amp;rev=1362554291&amp;do=diff</link>
        <description>Sometimes you want to instruct background tasks to stop whatever they are doing and quit. Typically, this happens when the program is shutting down. Programs using the “standard” multithreaded programming (i.e. TThread) are solving this problem each in its own way, typically by using boolean flags or Windows events.</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:synch:tomnimrew&amp;rev=1362554275&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:17:55-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:synch:tomnimrew - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:synch:tomnimrew&amp;rev=1362554275&amp;do=diff</link>
        <description>A typical situation in a multithreaded program is a multiple readers/exclusive writer scenario. It occurs when there are multiple reader thread which can operate on the same object simultaneously, but must be locked out when an exclusive writer thread wants to make changes to this object. Delphi already implements a synchronizer for this scenario (TMultiReadExclusiveWriteSynchronizer[^mrew-links] from SysUtils), but it is quite a heavy weight object which you can use in many different ways. For …</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:synch:criticalsections&amp;rev=1362554258&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:17:38-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:synch:criticalsections - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:synch:criticalsections&amp;rev=1362554258&amp;do=diff</link>
        <description>The most useful synchronisation primitive for multithreaded programming is indubitably the critical section[^crit-sec-links].

[^crit-sec-links]: &lt;http://en.wikipedia.org/wiki/Critical_section&gt;, &lt;http://docwiki.embarcadero.com/Libraries/XE3/en/System.SyncObjs.TCriticalSection&gt;</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:synch&amp;rev=1362554239&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:17:19-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:synch - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:synch&amp;rev=1362554239&amp;do=diff</link>
        <description># Synchronization  

Although the OmniThreadLibrary treats communication as a superior approach to locking, there are still times when using “standard” synchronization primitives such as a critical section are unavoidable. As the standard Delphi/Windows approach to locking is very low-level, OmniThreadLibrary builds on it and improves it in some significant ways. All these improvements are collected in the OtlSync unit and are described in the following sections. The only exception is the waitab…</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:highlevel:forkjoin&amp;rev=1362553978&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:12:58-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:highlevel:forkjoin</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:highlevel:forkjoin&amp;rev=1362553978&amp;do=diff</link>
        <description>Fork/Join abstraction creates a framework for solving //divide and conquer// algorithms.

	&quot; 

 Parallel.ForkJoin will create a computation pool into which you can submit requests (subtasks). Each subtask can create multiple sub-subtasks which are again committed into the computation pool.&quot;</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:highlevel:foreach&amp;rev=1362553942&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-03-06T02:12:22-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:highlevel:foreach</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:highlevel:foreach&amp;rev=1362553942&amp;do=diff</link>
        <description>For Each abstraction creates a parallel for loop that iterates over a range of data (number range, list, queue, dataset ...) in multiple threads. To create a parallel for loop, call Parallel.ForEach.

	&quot; 

 When you use Parallel.ForEach, OmniThreadLibrary starts multiple background tasks and connects them to the source through a serialization mechanism. Output is optionally sorted in the order of the input. By default, ForEach waits for all background threads to complete before the control is re…</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:demos&amp;rev=1352914840&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:40:40-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:demos - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:demos&amp;rev=1352914840&amp;do=diff</link>
        <description>OmniThreadLibrary distribution and SVN trunk include plenty of demo applications that will help you get started. They are stored in the tests subfolder. This chapter lists all tests.

- 0_Beep
	The simplest possible OmniThreadLibrary threading code.</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:howto:com&amp;rev=1352914729&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:38:49-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:com - created</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:howto:com&amp;rev=1352914729&amp;do=diff</link>
        <description>&quot; Can you give me any tips on how to use COM services from background threads?&quot;

It is actually very simple -- you have to remember to call CoInitializeEx and CoUninitialize from the task code and then you won't have any problems. 

I have put together a simple example that uses SOAP to retrieve VAT info for European companies using the SOAP service at ec.europa.eu. It is included with the OmniThreadLibrary distribution in folder examples/checkVat.</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Acheckvat.png&amp;ns=book%3Ahowto&amp;rev=1352914715&amp;tab_details=history&amp;mediado=diff&amp;do=media">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:38:35-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:checkvat.png - created</title>
        <link>http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Acheckvat.png&amp;ns=book%3Ahowto&amp;rev=1352914715&amp;tab_details=history&amp;mediado=diff&amp;do=media</link>
        <description>&lt;img src=&quot;/book/lib/exe/fetch.php?w=356&amp;h=281t=1352914715&amp;amp;media=book:howto:checkvat.png&quot; alt=&quot;book:howto:checkvat.png&quot; /&gt;</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:howto:databases&amp;rev=1352914690&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:38:10-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:databases</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:howto:databases&amp;rev=1352914690&amp;do=diff</link>
        <description>&quot; Can you tell me how to use databases in combination with OmniThreadLibrary?&quot;

Using databases with the OmniThreadLibrary can be quite simple at times; on the other hand, it can also be quite tricky. The main problem with databases is that you have to create database components in the thread that will be using them. As the visual components (as the TDBGrid) must be initialized from the main thread, this implies that you can't directly connect database-aware GUI controls to database components.</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Ahowto-database.png&amp;ns=book%3Ahowto&amp;rev=1352914590&amp;tab_details=history&amp;mediado=diff&amp;do=media">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:36:30-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:howto-database.png - created</title>
        <link>http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Ahowto-database.png&amp;ns=book%3Ahowto&amp;rev=1352914590&amp;tab_details=history&amp;mediado=diff&amp;do=media</link>
        <description>&lt;img src=&quot;/book/lib/exe/fetch.php?w=500&amp;h=447t=1352914590&amp;amp;media=book:howto:howto-database.png&quot; alt=&quot;book:howto:howto-database.png&quot; /&gt;</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Atwofish.png&amp;ns=book%3Ahowto&amp;rev=1352914558&amp;tab_details=history&amp;mediado=diff&amp;do=media">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:35:58-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:twofish.png - created</title>
        <link>http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Atwofish.png&amp;ns=book%3Ahowto&amp;rev=1352914558&amp;tab_details=history&amp;mediado=diff&amp;do=media</link>
        <description>&lt;img src=&quot;/book/lib/exe/fetch.php?w=500&amp;h=210t=1352914558&amp;amp;media=book:howto:twofish.png&quot; alt=&quot;book:howto:twofish.png&quot; /&gt;</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Afishfacts.png&amp;ns=book%3Ahowto&amp;rev=1352914516&amp;tab_details=history&amp;mediado=diff&amp;do=media">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:35:16-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:fishfacts.png - created</title>
        <link>http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Afishfacts.png&amp;ns=book%3Ahowto&amp;rev=1352914516&amp;tab_details=history&amp;mediado=diff&amp;do=media</link>
        <description>&lt;img src=&quot;/book/lib/exe/fetch.php?w=500&amp;h=441t=1352914516&amp;amp;media=book:howto:fishfacts.png&quot; alt=&quot;book:howto:fishfacts.png&quot; /&gt;</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?id=book:howto:multiframe&amp;rev=1352914482&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:34:42-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:multiframe</title>
        <link>http://otl.17slon.com/book/doku.php?id=book:howto:multiframe&amp;rev=1352914482&amp;do=diff</link>
        <description>&quot; *I am running multiple background tasks implemented with OmniThreadLibrary's
 CreateTask function and they are all interacting with the same form in the program.
 I want to separate user interface into separate frames, each interacting with one
 task but I can't find a good way to do it.*&quot;</description>
    </item>
    <item rdf:about="http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Aframedworkers.png&amp;ns=book%3Ahowto&amp;rev=1352914461&amp;tab_details=history&amp;mediado=diff&amp;do=media">
        <dc:format>text/html</dc:format>
        <dc:date>2012-11-14T12:34:21-04:00</dc:date>
        <dc:creator>gabr</dc:creator>
        <title>book:howto:framedworkers.png - created</title>
        <link>http://otl.17slon.com/book/doku.php?image=book%3Ahowto%3Aframedworkers.png&amp;ns=book%3Ahowto&amp;rev=1352914461&amp;tab_details=history&amp;mediado=diff&amp;do=media</link>
        <description>&lt;img src=&quot;/book/lib/exe/fetch.php?w=500&amp;h=155t=1352914461&amp;amp;media=book:howto:framedworkers.png&quot; alt=&quot;book:howto:framedworkers.png&quot; /&gt;</description>
    </item>
</rdf:RDF>
