Results 1 to 2 of 2
  1. #1
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    114
    Rep Power
    0

    Default Question regarding Multithreading in JavaFX

    I am using multithreading and JavaFX to grab the data from a database, so I update the GUI using progressbar. Say for example 10 progress bar for 10 threads. If I have 100,000 records in a database from which I am planning to
    pull using 10 threads then I am pulling 1000 records at a time using 10 threads.

    My Question is:

    1) Is it possible to have a stop button next to 10 progress bars and stop a particular thread if I wish to. As far as I know, once the threads are started in a multithreaded environment, it can't be stopped unlesh they finish ?

    Please correct me if I am wrong.

    Thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,792
    Rep Power
    25

    Default Re: Question regarding Multithreading in JavaFX

    it can't be stopped
    You can tell a thread to stop by setting a variable for example. When it receives the request, it can exit ending the thread's execution.
    I am assuming that the thread is executing code that you have written.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Question about Multithreading !
    By Jack_Tauson_Sr in forum Threads and Synchronization
    Replies: 3
    Last Post: 03-27-2014, 04:12 AM
  2. JavaFX Book | Learn JavaFX More In Depth
    By SnakeDoc in forum JavaFX
    Replies: 0
    Last Post: 05-18-2013, 12:10 AM
  3. Multithreading question about thread safety
    By javajp in forum Threads and Synchronization
    Replies: 0
    Last Post: 02-14-2013, 12:01 AM
  4. Multithreading question
    By booboo0187 in forum Threads and Synchronization
    Replies: 2
    Last Post: 01-31-2013, 09:55 PM
  5. JavaFX Script and JavaFX Mobile
    By levent in forum Java Software
    Replies: 1
    Last Post: 01-27-2010, 05:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •