comp.lang.ada
 help / color / mirror / Atom feed
* Multitasking doesn't work under linux?
@ 2002-02-15 16:48 Nazgul
  2002-02-15 16:57 ` Jean-Marc Bourguet
  0 siblings, 1 reply; 6+ messages in thread
From: Nazgul @ 2002-02-15 16:48 UTC (permalink / raw)


Hi, I have a program in Ada, it's a server that listens for connections on a
specified port, and when a connection is estabilished, it creates a new task
to attend that conneciont.

Something like

procedure serverd
  .....
  dummy= new Election;
  Election.Start(socketClient);
  Put_Line("Connection accepted");
 ...

end serverd;

"Start" is and entry point for "Election". The problem is:

Under windows XP, I build the server, launch it, and then launch the client
to connect. The server runs the task to attend the client, and outputs
"Connection accepted", while the Election task is running.

Under Linux, I build the server, launch it, and when I connect the client,
the task executes, but the procedure serverd stays blocked until the
Election task has ended up, and then outputs "Connecion accepted". I mean,
the tasks don't run concurrently under linux, but they do under Windows XP.

I can't find what I'm doing wrong, could you help me?

Thanks

========
A. Iradier





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multitasking doesn't work under linux?
  2002-02-15 16:48 Multitasking doesn't work under linux? Nazgul
@ 2002-02-15 16:57 ` Jean-Marc Bourguet
  2002-02-15 17:07   ` Nazgul
  2002-02-16 14:31   ` Robert Dewar
  0 siblings, 2 replies; 6+ messages in thread
From: Jean-Marc Bourguet @ 2002-02-15 16:57 UTC (permalink / raw)


"Nazgul" <darkelf@aim.homelinux.com> writes:

> Hi, I have a program in Ada, it's a server that listens for connections on a
> specified port, and when a connection is estabilished, it creates a new task
> to attend that conneciont.

I assume your runtime is using the FSU threads and not the native
threads.  Using the FSU has the advantage of been fully conformant,
but at the price that blocking a task did block all of them.  Native
threads  where not conformant in some more or less corner cases, but
when a task block, the other could run.

I think that with 3.14, the native thread runtime is fully
conformant as it had become the default.

You can change the runtime by changing some links. See the
installation instruction.

Yours,

-- 
Jean-Marc



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multitasking doesn't work under linux?
  2002-02-15 16:57 ` Jean-Marc Bourguet
@ 2002-02-15 17:07   ` Nazgul
  2002-02-15 18:28     ` Marc A. Criley
  2002-02-16 14:31   ` Robert Dewar
  1 sibling, 1 reply; 6+ messages in thread
From: Nazgul @ 2002-02-15 17:07 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

Thanks very much, I was using FSU threads, and the Election task blocked all
the other tasks on a blocking call by listening in a socket. I'm trying the
native-threads system.

"Jean-Marc Bourguet" <jm@bourguet.org> escribi� en el mensaje
news:3c6d3df8@news.cadence.com...
> "Nazgul" <darkelf@aim.homelinux.com> writes:
>
> > Hi, I have a program in Ada, it's a server that listens for connections
on a
> > specified port, and when a connection is estabilished, it creates a new
task
> > to attend that conneciont.
>
> I assume your runtime is using the FSU threads and not the native
> threads.  Using the FSU has the advantage of been fully conformant,
> but at the price that blocking a task did block all of them.  Native
> threads  where not conformant in some more or less corner cases, but
> when a task block, the other could run.
>
> I think that with 3.14, the native thread runtime is fully
> conformant as it had become the default.
>
> You can change the runtime by changing some links. See the
> installation instruction.
>
> Yours,
>
> --
> Jean-Marc





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multitasking doesn't work under linux?
  2002-02-15 17:07   ` Nazgul
@ 2002-02-15 18:28     ` Marc A. Criley
  2002-02-16 14:33       ` Robert Dewar
  0 siblings, 1 reply; 6+ messages in thread
From: Marc A. Criley @ 2002-02-15 18:28 UTC (permalink / raw)


Nazgul wrote:
> 
> Thanks very much, I was using FSU threads, and the Election task blocked all
> the other tasks on a blocking call by listening in a socket. I'm trying the
> native-threads system.

And just to reassure you, using native threads multitasking will most
assuredly work under Linux.  I and many others have vast amounts of
personal experience doing this :-)

Marc A. Criley
Consultant
Quadrus Corporation
www.quadruscorp.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multitasking doesn't work under linux?
  2002-02-15 16:57 ` Jean-Marc Bourguet
  2002-02-15 17:07   ` Nazgul
@ 2002-02-16 14:31   ` Robert Dewar
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Dewar @ 2002-02-16 14:31 UTC (permalink / raw)


Jean-Marc Bourguet <jm@bourguet.org> wrote in message news:<3c6d3df8@news.cadence.com>...
> "Nazgul" <darkelf@aim.homelinux.com> writes:
> 
> I think that with 3.14, the native thread runtime is 
> fully conformant as it had become the default.

You think wrong. This is a guess (since no documentation
confirms this guess), and it is a wrong guess. The native
thread run time is not fully conformant, and the documentation in fact
clearly states this.

P.S. Disclaimer, the fact that I occasionally point out errors in
posts on CLA does not mean that my failure to
respond means I agree. In fact I ignore most threads these
days, and even those threads I follow, I rarely bother to
correct the (many) errors in posts :-)

Robert Dewar



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multitasking doesn't work under linux?
  2002-02-15 18:28     ` Marc A. Criley
@ 2002-02-16 14:33       ` Robert Dewar
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Dewar @ 2002-02-16 14:33 UTC (permalink / raw)


"Marc A. Criley" <mcqada95@earthlink.net> wrote in message news:<3C6D4628.BCE88DF0@earthlink.net>...
> And just to reassure you, using native threads 
> multitasking will most assuredly work under Linux.  I and 
> many others have vast amounts of personal experience 
> doing this :-)

work here = conform to core RM requirements, but most certainly NOT
conform to Annex D requirements.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-02-16 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-15 16:48 Multitasking doesn't work under linux? Nazgul
2002-02-15 16:57 ` Jean-Marc Bourguet
2002-02-15 17:07   ` Nazgul
2002-02-15 18:28     ` Marc A. Criley
2002-02-16 14:33       ` Robert Dewar
2002-02-16 14:31   ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox