How to manage thread execution?

Hi friends,
I have a scenario like in my program i have created three threads like t1,t2,t3 and i have started thread t1and t2 at the same time and i have to put the condition like t3 will be started only when t2 finishes before t1 otherwise t3 will not be started.
Please tell me the logic for doing that.
Thanks.

You have a flag.
The execution path for t2 sets that flag when t2 is finished.
The execution path for t1 checks the flag at the end of the execution. If the flag is set then create t3 and start it.

Similar Messages

  • How to manage Execution of APO-DP planning on portal ?

    Hi all,
    See the scenario is like this :-
    -There is a planning area, in that planning area there are planning books.
    -If I select a particular one it is giving me screen which is proper.
    -On that screen I have two drop down selection fields which are the main concern of this issue(take them as group and subgroup).
    -So if I do selection from subgroup first it is showing me details of subgroups.
    -But after this selection if I go to group selection it is wiping the subgroup selection and only givin info about groups. It is not showing hierarchy as Group->Subgroup-> Data.
    -I want the above execution (<u><b>Group->Subgroup->Data</b></u>)after going 1st to subgroup and then to group will this is possible???
    Its urgent If anyone has idea about how to manage the execution of DP planning books please revert back.
    note- it is working properly on backend but it is showing this problem on portal screen.
    Should I go for new transaction iview for that???
    Regards,
    Aditya

    Dear Vijay,
    I doubt if there is any standard settings or configuration is there for this functionality. What i can suggest is either you add seperate key-figures for displaying total of all the periods and write macros to populate key-figure values in it. The second option is initiallize the key-figures for an extra bucket which is really required by the business and populate the total in that extra period by writing macro. By second method there will not be extra key figure required. Apart from writing macros you can use BAPIs for reading the key-figure and adding it and finally populating the key figure values in the key-figure but this is not required as macro is sufficient for populating the key-figure in both the cases.
    Please let me know if you think any other better way of doing it.
    Regards,
    Mukesh Pandey

  • How to manage VPN clients in SCCM 2012

    Hi,
    In my environment, I have multiple clients over VPN in multiple sites, 
    now I have problem, I how can I manage those clients for VPN, coz n CM 2012 I have to give boundary group and n boundary group  have to give the site server references, and I have only one IP subnet in whole environment, but from that subnet, some clients
    are from A site, B site and C site, now can you tell me how to manage them, 
    How to configure DP for them??
    How they can get correct MP?  
    Sharad Singh | My blogs: SharadTech | Twitter:
    @SinghSharaad | | Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.

    Jason, 
    I have only one IP subnet means I have only one IP subnet for VPN clients n all environment, all clients from all sites which are connecting with VPN they will fall on that VPN IP subnet.
    other than  have LAN/WAN link for all sites, which I have already configured according to Sites/DP and there s no problem, every thing is working fine.
    but for VPN i have only one network which is worldwide, and that network used by all sites, this is the problem, How can I manage that network, and where should I add for boundary/DP for site references??? 
    Sharad Singh | My blogs: SharadTech | Twitter:
    @SinghSharaad | | Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.

  • How to kill threads in obiee server

    Can some one please tell me how to kill threads in OBIEE server

    944632 wrote:
    Thanks for the prompt reply. your answer is helpful. Here is my problem.
    I am an OBIEE admin and getting lot of complaints fronm developers that BI Server services are not stopping. I was adviced by my senior that i have to kill thresads in the server.
    I followed what you told but when i open the RPD, i am unble to open cache in either offline or online modeHi,
    - Unable to open cache due to you already disabled cache (usage tracking - nqsconfig.ini file) cache diabled that why you can't able to open cache
    just make sure
    [CACHE]
    ENABLE = YES;
    C:\Oracle\Middleware\instances\instance1\config\OracleBIServerComponent\coreapplication_obis1 (obiee11g file path ref)
    - unable to stop biservices? if that case you can kill it different ways, (stop bi services/ctrl +c on services/task manager/FMW (console/EM)/ services.msc etc) which way did you tried?
    (which version did u tired)
    Thanks
    Deva

  • How to manage apps for lots of devices

    Hi, I work @ all college in AU. We are implementing ipads as a study tool. Initially the ipads will be set up by the college, then distributed to the students to keep.
    My question is about how to manage apps for so many devices. For example we have 2 apps that need to be installed for 150 units to begin with. This could get quite messy I would think. Has anyone had any experience with this sort of volumes? Any and all input would be greatly appreciated.

    Look in the forum above this one...
    http://discussions.apple.com/thread.jspa?threadID=2594001&tstart=0

  • How to manage concurrency of a class

    how to manage concurrency of a class???????????

    I think you have to use thread for concurrency>>>>..

  • How to manage socket communications

    i need to learn about how to manage socket communications. does any one has sample codes to share that illustrates how to manage sockets? Im going to create an application that listens over a socket. My socket listener should be able to read over the socket continuously without user intervention. If there's no data, it would wait until something comes in. If some data come in, the listener should be able to read it automatically, and save data in db.
    Im thinking of an infinite loop here, but the problem
    arises when the socket is waiting for data to come in. The application consumes 100% CPU resources. And im only running one instance of my socket listener. My solution here is to use threads and let the thread SLEEP for a while when no there's no data yet.
    Any advise on this matter is very much appreciated. Thank you.

    It sounds, that you are using non-blocking read from a socket inside a busy wait loop. You should do a blocking read, which means your process/thread will be suspended by OS untill something is available on your socket.
    I'm new to Java and I can not say how actually to implement this, but look for "blocking/non-blocking read" in network interface documentation.
    Zhenya.

  • How to manage specifics

    Hi,
    my question is How to manage specifics devlopement? Are there any recommandations from ORACLE ? How to distinguisshe specific forms develepoed by customer from standards ? I heared something about XXCUSTOM_TOP but I need some more information.
    Many thanks.

    Check the following thread:
    Custom application implemented in E-bussiness Suite
    Re: Custom application implemented in E-bussiness Suite

  • How Transaction Manager work with Resource Manager, like Connection pool?

    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!

    Xin Zhuang wrote:
    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!Hi. If you configure your WLS DataSource to use keep a connection for
    the duration of a tx, it will do that, and in any case there can be
    no deadlock however many connections operate for a given XA transaction.
    Here is the best coding form for DAOs or any other user-written code
    for using WebLogic DataSources. This is important for two reasons:
    1 - Thread-safety is maintained as long as the connection is a
    method-level object.
    2 - It is crucial to notify WebLogic that you are done with a connection
    ASAP, by your calling close() on it. We will then put it back in the
    pool, or keep it under the covers for your next request if it's in a
    transaction etc. The pool is optimized for quick get-use-close scenarios.
    public void one_of_my_main_JDBC_Methods()
    Connection con=null; // Must be a method level object for thread-safety
    // It will be closed by the end of the method.
    try {
    con = myDataSource.getConnection(); // Get the connection in the try
    // block, directly from the WebLogic
    // datasource
    // do all the JDBC within this try block. You can pass the
    // connection to subordinate methods, but not to anywhere
    // that thinks it can use the connection later.
    rs.close(); // close any result set asap
    stmt.close(); // then close any statement asap
    // When you're done with JDBC
    con.close(); // close the connection asap
    con = null; // nullify it so the finally knows it's done
    catch (Exception e) {
    // do whatever catch stuff you want. You don't
    // need a catch block if you don't want one...
    finally {
    // It is important to close a JDBC connection ASAP when it's not needed.
    // without fail, and regardless of exit path. Do everything in your
    // finally block in it's own try-catch-ignore so everything is done.
    try { if (con != null) con.close();} catch (Exception ignore){}
    return ret;
    }

  • How to kill thread

    I am facing the problem in killing the thread after some interval. If anybody knows how to kill the thread in middle plz give me reply
    Thanks
    Sreedhar

    Thread.interrupt()
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thre
    ad.html#interrupt() is not about killing or stopping
    a thread. It is more about kicking a blocked thread.
    There is no way to kill a thread. As been said
    above, the thread should be designed to accept
    instruction to stop gracefully.
    The interrupt() was created by sun as a solution sun came up for the problems of thread stop(), it should be the cannonical way to stop a thread.
    The problem with having your own mechanism of interrupting a thread is that you should have a method to interrupt a thread execution and a flag that should be checked from inside your thread or runnable code to see if it should stop and if so, do it cleanly. The problem with this aproach is that if the thread is sleeping or in some blocked state, calling your own interruption framework is inefective, as it could never get a chance to run the code.
    To solve that, sun privides us with the method( interrupt() ) and the flag ( Thread.interrupted() ) with the advantage that on calling it, it guarantees you that it would take effect even if the thread is in a blocked state.
    So, you are right about having to implement your own gracious interruption but the right way to do that is by checking interrupted(). And no Thread.interrupt() is not just about blocked threads, although it covers that ground.
    May the code be with you.

  • Thread execution causes Swing GUI to become unpresponsive

    Hello, I'm trying to refresh my memory of multithreaded Swing applications and have run into a wall. I have my main class, SimpleGUI, which creates the GUI interface and instantiates SimplePB and starts the SimplePB thread. The problem is that the SimpleGUI main class, which has a button to start the SimplePB thread so that a progress bar is updated, will result in a unresponsive GUI when the button is clicked. The button action code follows:
    public void actionPerformed(ActionEvent ae)
              System.out.println("Got action! "+ae);
              if(ae.getActionCommand().equals("Start")) {
              jb.setEnabled(false);
              spbt.run();
         }Do I need to do the Swing interface in a multithreaded manner as well? If so, how? If not, what am I doing wrong? Any pointers are greatly appreciated, thanks.

    sbpt.run();sbpt.start();
    At the moment you're not doing 'thread execution' at all, you are just running its code inline in the AWT thread, which freezes the GUI, which is why you needed the thread in the first place.

  • How to Manage the Resource Master in Primavera Enterprise Version

    We are using P6 enterprise version in our company having a central database. We had created our own unique resources and standardised across the enterprise and is Admin protected. However we often have to import some schedules sent by our consultant/client. In those schedules they have their own resources.
    So when we import these schedules, it also imports the resources along with it and pollutes our resource master.
    Can anyone let me know, how to manage such a situation.
    Regards

    We have met this issue. You have few ways to deal with it, but each has its own +ve and -ve.
    1- You may create a separate "Working" db into which you can import those files and keep them there only. Your master db shall be used for maters and your own program only.
    2- You may do the same for checking the resourses, vet them before importing into the final db
    3- P3 and MSP importation allows you to select the node to which the resources will be located. We have created a resource node called "Imported Resources" and dumped all those resources into it. Our users don't have access to that node so those resources can only be used on the imported program and can't be assigned to any other program / activity
    4- Enforce your supply chain to use the same resource list. We managed to do that for our main and subcontractors. That formed part of their contracts.

  • How I Managed to Install Windows 8.1 Pro on an iMac 27-inch, Late 2013

    As is typical with many of my Boot Camp installs, this one did *not* goes as smoothly as planned. This installation was particularly troublesome, so I thought I would share how I managed to set up Boot Camp on a brand new iMac (27-inch, Late 2013) using a Windows 8.1 Pro DVD and an external Apple SuperDrive. These are the steps I took:
    Download Boot Camp Support Software 5.1.5640 (http://support.apple.com/kb/DL1721)
    Copy Boot Camp Support Software to empty MS-DOS (FAT)-formatted USB key
    Run Boot Camp Assistant and select third option only (Install Windows 7 or later version)
    Computer would reboot after Boot Camp Assistant finished but would boot back into Mac environment and not continue Windows installation
    Boot computer holding down option key and select Windows (with DVD icon) and go through initial setup process (could go as  far as trying to format Boot Camp partition as NTFS and then got stuck)
    Quit Windows installer and reboot computer holding down option key and select EFI Boot
    Run Windows installer
    These same steps worked for another iMac (same model) that I set up later the same day.

    Note: These types of discs or activities are not supported by DVD or CD sharing:
    DVD movies.
    Audio CDs.
    Copy protected discs such as game discs.
    Install discs for an operating system such as Microsoft Windows (for use with Boot Camp), or Mac OS X.
    Burn a CD or DVD

  • How to manage one wsp and dll for multiple clients in farm environment

    1. There is a product which is developed using C sharp , jquery,CSS and sharepoint object models which have been packaged into .wsp file. Whenever we introduce new functionality to the product we used to branch the
    previous code as a version , say Version 1.0 and new functionality of the product will in another solution. This is how we are managing the code in TFS as versions. Each newer version will have new functionalities. We do not give latest functionality for all
    the clients. Each client is having its own version of functionality. Technically in order to access the functionality, the wsp solution should be present in the solution repository which is available in SharePoint central administrator site. This solution
    will be deployed on the client’s site. We are following the above process in SharePoint standalone installation where we used to purchase dedicated server per client and installed sql, SharePoint foundation 2010 as standalone installation and adding the client
    related version of the code to the solution repository. Later host on the site which is created for that client purpose. This process is same for all the clients where we purchase individual server for each client .
        Now we want to host our product in farm environment of sharepoint foundation 2010 where we are going to try 3 level architecture. 
    • SQL Server-In this sever we are going to install sql server 2008R2 standard edition. Which should serve the database service for all the web applications/sitecollections which we are going to create in Web front end server.
    • Application server- In this server we are going to install the sharepoint as farm and will install search server express for serving search functionality for our product
    • Web front end server- In this server we are going to add this server to Sharepoint farm which we have created in application server. Here we are going to create web applications and site collections for all the clients.
    In this scenario how to manage multiple versions of same wsp solution?
    Another major issue w.r.t the architecture of the product and new approach for client deployment as follow.We have CSS, jquery files for serving the functionality.These files have been mapped to 14 hive folder.If any changes we do one of the jquery file or
    css file which is meant for latest version and not for old version, then how to manage this new functionality for that particular css or jquery file in 14 hive folder, since there is only one 14 hive folder. What is the best practice to make this happen? Another
    thing is, how to manage dll files for individual client?

    It sounds like you have a farm scoped solution at work. In that case you can only have a single instance of it per farm, you'd have to branch each version so they appear to be seperate solutions entirely (thus ruining your clients upgrade process).
    Bluntly i don't think a single farm can manage all your user environments.

  • How to manage photos from multiple accounts

    Hi,
    i am trying to solve one problem. I have one iMAC where i have two user profiles connected to different AppleIDs. Next to it there are two iPhones and two iPads. I am trying to find out, how to manage photos from all these devices using one account on iMAC. Second question is if there is any finction in iPhoto that can publish images to NAS server? Second alternative for me is to byu iCloud drive space and use Family sharing for publishing photos. Bellow text schema is attached, it is only my idea and i dont know if this could work like this. Did anyone somehow solved this configuration? Thanks

    I can see the screenshot if I double click on it.  However, here is it again.  Being Halloween maybe it'll show.

Maybe you are looking for

  • SAP WM cutover open orders

    While doing cutover activity what should be the status of the Open production order, open purchase order &  open deliveries for sales. We are using fixed bin for production staging  so release production order etc it will not create transfer requirem

  • Plug-Ins and Extractors - Related to Upgrade of Source system

    Hi, We are upgrading from R3 to ECC. Can I say that, if the Plug-in in current R3 system and the new system(post upgrade)(ECC) are same then, the extractors will also remain same ? hence, nothing will be affected in BW ? For example, if the current s

  • Installation error: cannot find the data source checking utility (dbcheck)

    BO XI 3.0: During the process of installing "Dashboard and Analytics Servers", we've got this error. Installation error: cannot find the data source checking utility (dbcheck) Have anyone encountered this issue? We can't move on after this error. Tha

  • Non Functional Icons

    Upgraded to 4.1. Everything worked but the GPS until I turned off 3G then everything worked and worked well. Now after a Sync last night, everything still works EXCEPT for the "fixed icons" on the bottom of the screen..phone, Mail, etc. I went to sea

  • Shut down automatically when downloads complete/finished

    Hi all, Does anyone know of a way to shut down automatically when downloads complete/finished (other than estimating how long they will be and modifying the energy saver schedule). Thanks, C.