Re: [Orbit-python-list] Orbit-python and threading?
Status: Inactive
Brought to you by:
tack
|
From: Marijn V. <ma...@me...> - 2001-11-08 15:09:48
|
On Thu, Nov 08, 2001 at 09:13:29AM -0200, Christian Robottom Reis wrote:
> On Thu, 8 Nov 2001, Marijn Vriens wrote:
> There might have been implemented some sort of mainiteration() method in
> ORBit by now (we're at 0.5.12!), but at the time there was none and this
> was a real solution to a complicated problem.
Yes, i am surprised that there's not.. Orbit has a (degree of) stable
feeling to it, and this is like the second-thing (after pure RPC) that
people would need, I think..
> You won't be actually using gtk at all, and there is little effect on your
> program beyond it working. Well, come to think of it, you will need the
> libs, and X11 running and... :-) Well, in my case it was convenient, at
> least.
Exactly! This is my problem with the GTK solution. I cannot tell now,
if the computers where my program will run on will have all this stuff
installed, I want to avoid dependency bloat if I can.=20
Maybe some idea would be to copy/implement the same functionality as
gtk.mainloop(), and let the user decide which of both he/she wants to
use. And when the Orbit people get their stuff together you just
convert this orb.mainloop() (to give the beast some name) to just pure
C calls. =20
Again, I have to say that I have no idea how much work is involved
with what I am suggesting :) But that would seem like the "best"
non-dep-bloat solution.
> > Maybe I am looking at this from the wrong side... What I want Corba
> > for is to provide me with a nice way to give RPC calls for some
> > simulation clients. That Sim server should update it's data according
> > to 2 things:
> > - Events from clients (via Corba).
> > - Time passing.
>=20
> Why not create a time-ticking client that triggers a call to the server? I
> know it's not magic, but it will work.
>=20
> > - Fork() off a process that does the updating and communicates
> > changes via shared-memory or something like that.
> > - Fork() off a process that just calls some "update()" method on a
> > special interface once in a time period, to make the process do the
> > processing for the time that has passed.
>=20
> Well... I hate both of these. Do you need a forked process, or can you
> spawn one together with the server?
Ehhh.. of course! Where was my head? I can make the server exec an
extra program ( itself? With some different argv[] ) that does a
update() once in a while.. Not so very horrible. And at least, it
"invisible" for the end-user. Still not the cleanest solution but it
will work.
Thanks for the Help, It's much appreciated..
Marijn.
--=20
Get loaded from the source: Do Linux!
Marijn Vriens <ma...@me...>=20
GPG/PGP: 6895 DF03 73E1 F671 C61D 45F4 5E83 8571 C529 5C15 |