Is it possible to query a thread in order to see what is on it?

I have a class which spawned a separate thread for itself to run on (from behind the scenes- I did not create a separate thread myself) but I'm not sure it is actually running on that thread. It seems like it is running on the main thread due to the erratic problems I am having. Is there any way to find out what is actually being 'handled' by a particular thread? Thanks

Thanks, all. I have in fact called start(), not run() - but it was definitely worth asking... I really haven't needed to pay that much attention to threads before.
The thread in question is a Java Sequencer thread, which plays a midi sequence. Hence the importance for proper timing. I have used the profiler in NetBeans to see what threads are running, and I do in fact have a Java Sequencer thread, but it is reportedly sleeping while the program runs. The midi sequence plays with imperfect timing, as if is being played by the Swing thread, or that it is played by the Java Sequencer thread, but at a lower priority than that of the GUI thread.
So to be clear, what I really am trying to do is to find out if my midi sequence is actually being played by the Java Sequencer thread (which seems to be spawned in relation to the code: sequencer = MidiSystem.getSequencer()).
I tried the NetBeans debugger and I wasn't to get information on the threads other than their names (OK, I am probably a newbie), so I'll try a little more from that angle.
I hope this isn't bad form...but I posted a vaguely similar question on the java.sound forum, and (ultimately) had this suggestion:
"If you created your own class that extended sequencer, you'd be able to do "Thread.currentThread()" to get the thread it's running on...and I think that's going to be the trick."
If I do this then I could increase that threads priority, and see if it helps.
If I discover anything interesting, I'll post the findings.
Thanks again, Scott

Similar Messages

  • Is it possible the query in view object is dynamic?

    Is it possible the query in view object is dynamic?
    Generally, make the column list dynamic.
    I think this is related to whether view object can be assembled at runtime based on a dynamic cursor in a procedure?
    I ask this because I would like to know how we can use OA framework to simulate crosstab workbook in Discoverer?
    Anybody has some clues, please advise.
    Thanks.

    Hi Shay,
    Let me tell you briefly... I am sending input as customerId,customerNumber,CustomerName to the web service, if the record is available i am getting the response and i am displaying those records on page as a table. Now when i click a row i need to populate another table with all sale orders of that customer. From webservice datacontrol i have only customer object, I dont have Sales Order Object. For this i need master detail relation. In this case how to proceed. Thats why i am thinking to create a vO and EO object for sales orders table and i want to create view link for this sales order and customers. As i don't have customer VO and EO object to create view link.

  • Is it possible to create a thread and run it in background in nokia ??

    Is it possible to create a thread and run it in background in nokia series 40 mobile phones using j2me ??

    Probably a good question for ForumNokia. If you mean start up a thread and run in the background while your MIDlet UI does other things, then sure, why not. If you mean that you want to exit your MIDlet, but leave a thread running in the background, then I don't believe you can do this on series 40. S60 is another story since it supports multiple tasks.

  • Is it possible to combine 2 Threading Database Items?

    Is is possible to combine multiple Threading Database Items in HCM Extract? I am trying to extract the Personal Details ( i.e just Employee Name, Person Number, Primary Email Address etc.) and Assignment Details (i.e. Salary Details, Department, etc.) in file. I need to extract the new employees and changes using Threading Database item option. Please let me know the relevant option for it or let me know how can we combine Person and Assignment Threading Database Items.

    I am not HCM expert so I am not sure what "combine multiple Threading Database Items" means in this context. You may find this blog post covering various tools useful specifically the link to the HCM extract documentation that contains a concrete example ..
    Jani Rautiainen
    Fusion Applications Developer Relations                             
    https://blogs.oracle.com/fadevrel/

  • Query on Thread

    Hi ,
    I have a query on Thread in Java.
    In the class Thread there is a method named start(), which when called , invokes another method run().Then why we do not call the method run() directly ,instead of calling start() ?
    Regards.
    Ayan

    run() runs in the thread it was called from. So if you want another thread, you need to call start(). but if you want to run another thread's run() in your thread, by all means call run()

  • It should be possible to close a thread without saying it's answered.

    It should be possible to close a thread without saying it's answered.
    Maybe closed - resolved or closed - not resolved.
    Edited by: Mike Angelastro on Jan 29, 2010 6:43 AM

    Mark it answered may not mean your question is answered.  If you do not satisfy all replies, you simply do not assign any points.  Everyone will know it is not answered.  You may post the last message as No satisfied answer.
    Thanks,
    Gordon

  • Parallel query worker thread was involved in a deadlock

    Hi,
        We are getting deadlock issue in MSSQL 2012 enterprise edition. By enabling the trace we could find the MORE number messages as below: 
    "parallel query worker thread was involved in a deadlock"
    Along with this there are some other entries with dead lock information ( chain, graph) . 
    Please suggest.
    Thank you 

    OP, I think that article posted by Saeid is exactly about your situation, although SQL2012 might have changed the message slightly.
    What the article says is bad news - you have done nothing wrong, yet SQL Server is messed up.  The only "fix" recommended is eliminating parallelism by using a hint "option (maxdop 1)" at the end of your query.  This should do the trick, but may
    run more slowly.
    You can try to reduce the odds of it happening by adding indexes.  Actually, ANY change to your plan or data model may make just enough changes to come up with another plan that does NOT get these self-deadlocks.  Any query that is more efficient,
    should reduce the odds of a deadlock.
    You can also try to analyze the deadlock as you would any deadlock, it may suggest another way to write the query. 
    Josh

  • Is it possible to check which thread is currently executing?

    Hi,
    is it possible to check which thread is currently executing in MIDP?
    actually i want to display a gauge for connection and download status and i
    want to increment the gauge as per data download...
    i already have implemented the Runnable interface..
    now using another thread i need to increment the gauge value until a boolean
    variable returns true.
    but for this, i need to check which thread is executing ....
    plz help.

    Like this?
    Thread aParticularThread;
    public void run() {
      if (Thread.currentThread() == aParticularThread) {
    }shmoove

  • Is it possible to have 2 threads running at the same time?

    Is it possible to have 2 threads running at the same time at different times eg 1 repeats every 20 miliseconds and the other 40 for example. Also could you have 2 run() methods in one script, in one file? If so how? Help soon would be appreciated. Thanks.

    Is it possible to have 2 threads running at the same
    time at different times eg 1 repeats every 20
    miliseconds and the other 40 for example. Yes.
    http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html

  • Is it possible to query Google finance using Flex?

    Google Finance has an open API for programmers. Is it possible to query Google Finance using Flex?
    Regards,
    Pooja Gupta

    To hold a servo motor at constant torque, all you need to do is provide a constant voltage. You can accomplish this using the analog output (DAC) of a FlexMotion board. To gain access to the DAC, configure the axis as an open loop stepper, then use the Load DAC.flx VI to output an analog voltage. The downside to this is that you won't have feedback, so you'll have no way to determine your position.

  • IMPDP |Possible  using Query option

    HI PPL,
    I wanted to Know whether IMPDP is possible using query option, as i have taken full expdp dump of the mentioned table and want to import only select rows.
    impdp arup/arup directory=demo_dir dumpfile=employees.dmp
    query=employees:\"where salary\>10000\ order by salary" tables=employees
    version:10gR2
    platform:UNIX
    regards

    Hello,
    Yes you can use QUERY parameter with IMPDP.
    But the syntax may be a little bit different than with the old IMP utility:
    QUERY
    Default: There is no default
    Purpose
    Allows you to specify a query clause that filters the data that gets imported.
    Syntax and Description
    QUERY=[[schema_name.]table_name:]query_clauseYou may have more examples on the following link:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10701/dp_import.htm#BEHFGIGF
    Hope this help.
    Best regards,
    Jean-Valentin

  • Problem of Query of Module Purchase Order, Good Receipt PO, Good Return

    Hi,
    I would like to seek for assistance regarding double entries of documents,  I have used the query and found out lately the it has a problem, Please refer to thread "Query of Module Purchase Order, Good Receipt PO, Good Return" for details.
    You help is very much appreciated.
    Regards,
    Clint

    Hi Clint,
    Try this one:
    SELECT DISTINCT 'GRPO' AS TYPE, T1.DOCNUM
    'GRPO/RET#', T3.DOCNUM 'PO#',T1.CARDCODE,
    T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE, T0.QUANTITY,
    T0.PRICE, T0.LINETOTAL
    FROM DBO.PDN1 T0
    INNER JOIN DBO.OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
    LEFT JOIN DBO.POR1 T2 ON T0.BASEENTRY = T2.DOCENTRY
    INNER JOIN DBO.OPOR T3 ON T2.DOCENTRY = T3.DOCENTRY
    WHERE T1.DOCNUM = '[%0]' AND T0.ITEMCODE IS NOT NULL
    UNION ALL
    SELECT DISTINCT 'RETR', T1.DOCNUM,T3.DOCNUM,
    T1.CARDCODE, T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE,
    T0.QUANTITY, T0.PRICE, T0.LINETOTAL
    FROM PDN1 T0
    INNER JOIN OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
    LEFT JOIN RPD1 T2 ON T0.TRGETENTRY = T2.DOCENTRY
    INNER JOIN ORPD T3 ON T2.DOCENTRY = T3.DOCENTRY
    WHERE T1.DOCNUM = '[%0]' AND T0.ITEMCODE IS NOT NULL
    If you still have duplicates, let me know any differences in those lines.
    Thanks,
    Gordon

  • SQL query to see what the db/schema is doing

    My apologies in advance as I am sure this has been covered. However, my google foo is failing me. :(
    Oracle 11g on Centos 5
    I am running a script against the database from my local pc through command prompt. I am wanting to run a query against the db to see what part of the script it is running and if it's possible I would like to be able to see if it is doing read / writes. Similar to an onstat on informix.

    Welcome to the forum!
    >
    I am running a script against the database from my local pc through command prompt. I am wanting to run a query against the db to see what part of the script it is running and if it's possible I would like to be able to see if it is doing read / writes. Similar to an onstat on informix.
    >
    Oracle has no equivalent to onstat - http://www.oninit.com/onstat/
    Oracle also has no knowledge of your 'script' contents.
    As SB mentioned you can get a list of sessions and their identifiers. Then you can query the V$SESSION_LONGOPS system view to get information about long running operations.
    See V$SESSION_LONGOPS in the Database Reference. The same doc (see index) has information about V$SESSION and V$SQL
    http://docs.oracle.com/cd/B19306_01/server.102/b14237/dynviews_2092.htm#REFRN30227
    >
    V$SESSION_LONGOPS
    This view displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.
    To monitor query execution progress, you must be using the cost-based optimizer and you must:
    •Set the TIMED_STATISTICS or SQL_TRACE parameter to true
    •Gather statistics for your objects with the ANALYZE statement or the DBMS_STATS package
    You can add information to this view about application-specific long-running operations by using the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS procedure.
    >
    If you provide more information about what commands are in your script, what the script does and what information you are trying to obtain maybe we can be of more help.

  • Select query help for Sales order

    Hi Experts,
    I have to write a select query to fetch sales orders which are open along with the quantities which are open ( not delivered). What would the best approach for this?
    Any help is appreciated. Expecting code samples....Thanks
    Thanks
    Ricky

    hi,
    do like this,
    write a select query for vbak and vbuk as follows.
    delivery status field is <b>lfstk</b> from <b>vbuk</b>,
    and relation field is <b>vbeln</b> from the both the tables.
    reward points if useful,
    regards,
    seshu.

  • HT3546 I have been unsuccessfully trying to extend the wifi of my Time 2T Capsule with an Airport Extreme 2nd Gen. It works for a while and then loses configuration. I have done everything possible, disconnected it, reset it but it keeps failing, what to

    I have been unsuccessfully trying to extend the wifi of my Time 2T Capsule with an Airport Extreme 2nd Gen. It works for a while and then loses configuration. I have done everything possible, disconnected it, reset it but it keeps failing, what to do?

    What model and firmware is the 2TB TC?
    What firmware is the AE?
    Does the AE get good signal from the TC in its current location?
    Signal can only be extended that is received intact.
    Is it extending on 5ghz? As I remember it a Gen2 AE is only single band, although you can choose either 2.4ghz or 5ghz.
    I am fairly sure you are going to tell me your TC is AC model..
    I would do a couple of things..
    1. Fix the wireless name, make it short, no spaces and pure alphanumeric.
    2. Fix the wireless channel for 2.4ghz so it is not going to jump around.
    3. Get real results from the AE in its current location for signal strength.. this is really only possible on v5 utility. And that is a double pain with Mavericks because you cannot use it.
    Apple have removed all the useful diagnostics from the airport utility. There is next to nothing left. So you need to use the computer and its diagnostics to find signal levels in the location.
    http://support.apple.com/kb/HT5606

Maybe you are looking for

  • Reporting Service Error Code 7403, on SCCM 2012 R2 with SQL 2012 SP1 CU6

    Dear All, I am facing issue to install Reporting Services Point on SCCM 2012 R2 with SQL 2012 SP1 CU6. getting error messages id 7403. please let me know if SQL 2012 SP1 CU6 is supported with SCCM 2012 R2 or not & if you have any solution on it. Erro

  • Batch change page size of InDesign documents

    I have about 300 one-page InDesign (cc 2014, Mavericks) documents of varying page sizes. Each page is 4 inches wider and 4 inches taller that the content of the page. The content is in the middle of the page-effectively making a 2-inch margin (but wi

  • How do I delete files from a Time Machine backup?

    Hi, I have a Time Machine backup that has a large group of image files on it. How can I delete this data from the TM backup so it is no longer taking up that space on the Time Machine backup drive? Just delete the files in Leopard and run Time Machin

  • IBooks Author & iPhone

    I just pushed a new short story that was done in iBooks Author and does not include any multimedia.  Luckily, the story went live in about 12 hours.  Unfortunately, it's shown that it works on the iPad only.  Why wouldn't work on the iPhone?  Is this

  • Problem with saved tabs and downloads

    Hello. After updating to version 32.0. i have a few problems. First, after opening Firefox some of my saved tabs became new tabs. I`m using Super Start, maybe its his problems, but it doesn`t look like that. Previously it worked fine. Second, i can`t