• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
GUI update, multi-threaded Cocoa Java app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUI update, multi-threaded Cocoa Java app


  • Subject: GUI update, multi-threaded Cocoa Java app
  • From: "John W. Whitworth" <email@hidden>
  • Date: Mon, 22 Apr 2002 08:39:34 +0100

What is the accepted wisdom on updating a Cocoa Java GUI from Java threads producing data?

No distributed objects in Cocoa Java.
Selectors invoked by notifications don't run in the main run loop but in the threads sending the notification.
I tried passing a reference to the main run loop to the threads so that they could schedule a selector call (performSelectorWithOrder) but this didn't work.

All I could come up with was a repeating timer updating the GUI in the main run loop from data posted from the threads via synchronized methods.

I guess some kind of producer/consumer synchronization might be possible between the main and spawned threads. There must be an elegant solution, such as the swing invokelater call.

John Whitworth
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: GUI update, multi-threaded Cocoa Java app
      • From: Cryx <email@hidden>
  • Prev by Date: Re: Correct way to determine machine's IP address in Cocoa
  • Next by Date: Re: Displaying a table entry in Bold
  • Previous by thread: Re: Export data to Excel
  • Next by thread: Re: GUI update, multi-threaded Cocoa Java app
  • Index(es):
    • Date
    • Thread