Author Topic: Developing Multithreaded Applications  (Read 5408 times)

0 Members and 2 Guests are viewing this topic.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Developing Multithreaded Applications
« Reply #1 on: July 08, 2005, 10:10:07 am »
Code: [Select]
public class thing extends Thread
{
    public static void thing()
    {
        super("thing");
        // blarg
    }
}
Java has had multi-thread simplicity for a LONG TIME.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: Developing Multithreaded Applications
« Reply #2 on: July 08, 2005, 11:03:34 am »
Yeah, threading in .NET is a cinch.

Of course in Java, you have to have a stupid extra worker class to support multithreading.  .NET supports function pointer (delegate) callbacks.  :)  Far superior, especially when you consider that they're type-safe at compile time.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Tuberload

  • Neophyte
  • x86
  • Hero Member
  • *****
  • Posts: 530
    • View Profile
Re: Developing Multithreaded Applications
« Reply #3 on: July 08, 2005, 03:23:45 pm »
Yeah, threading in .NET is a cinch.

Of course in Java, you have to have a stupid extra worker class to support multithreading.  .NET supports function pointer (delegate) callbacks.  :)  Far superior, especially when you consider that they're type-safe at compile time.

Yes far superior if you're interested in running a bloated windows application only.  :P
I am prepared to be ridiculed for what I believe, are you?

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Developing Multithreaded Applications
« Reply #4 on: July 08, 2005, 03:40:11 pm »
Amen Tuberload, Amen.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Developing Multithreaded Applications
« Reply #5 on: July 08, 2005, 06:26:43 pm »
Incidentally, there is less overhead to spawning a child process on Linux (using fork()) than there is spawning a thread on Windows.  I wish I had a source for that, but it's in a book I read a little while ago.

On Linux, a lot of things (particularly daemons) will fork when they get a request.  The child process (which can share memory with its parent, in an efficient way) handles the request and the main process goes back to listening.