~ubuntu-branches/debian/sid/pyro/sid

« back to all changes in this revision

Viewing changes to examples/multithread/Readme.txt

  • Committer: Bazaar Package Importer
  • Author(s): Carl Chenet, Carl Chenet, Jakub Wilk
  • Date: 2010-09-14 01:04:28 UTC
  • Revision ID: james.westby@ubuntu.com-20100914010428-02r7p1rzr7jvw94z
Tags: 1:3.9.1-2
[Carl Chenet]
* revert to 3.9.1-1 package because of the development status 
  of the 4.1 package is unsuitable for stable use
  DPMT svn #8557 revision (Closes: #589172) 
* added debian/source
* added debian/source/format
* package is now 3.0 (quilt) source format
* debian/control
  - Bump Standards-Version to 3.9.1

[Jakub Wilk]
* Add ‘XS-Python-Version: >= 2.5’ to prevent bytecompilation with python2.4
  (closes: #589053).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This example shows the need of multithreading in the Pyro server.
 
2
The client spawns serveral concurrent loops which access the same
 
3
remote object. If the Pyro server is single threading, each remote
 
4
invocation has to wait for the previous one to complete.
 
5
If the Pyro server is multithreading, each remote invocation is
 
6
processed simultaneously.
 
7
 
 
8
 
 
9
If your server is I/O bound, you may successfully run several
 
10
requests at the same time without noticable delay (because the
 
11
I/O gets executed in parallel).
 
12
 
 
13
If your sever is CPU bound, you may notice that the multithreading
 
14
has no effect, because the CPU is busy 100%. If you are lucky and
 
15
have multiple CPUs, you may experience speedup after all. But
 
16
no more than the number of cpus you have.
 
17
 
 
18
 
 
19
Thread Local Storage (TLS): the server access Pyro's TLS feature.
 
20
If you're running in single-threaded mode you'll see that the
 
21
counter is shared among all invocations (because there is only
 
22
one thread) and that it increases with each invocation.
 
23
If running multithreaded, you'll see that each caller/thread
 
24
has its own TLS and that the counters are increased independently.
 
25
The server also takes care of correct initialization of the TLS
 
26
by setting a custom initTLS function in the Daemon.
 
27