Logging with threads

does any one know how to write log information from multiple threads to the same log file, without mess up the log file? i.e, is it possible to keep info from different threads in order without calling the wait() to slow down the program?
any thoughts will be appreciated.

I don't think so (hence multithreading). If you don't want to syncronize the call to the .log() method within the threads then I would guess your best bet would be to try and ensure that all the individual threads only log 1 message each.
You could get each thread to say add strings to a logging HashMap assigned to each thread and then just before the thread ends - walk throught the HashMap and create a single log entry from the contents there and write it to the file.
Not ideal, but depending on your circumstances, it might just work.

Similar Messages

  • Flashupdater filling system.log with spew

    Has anyone else noticed that flashupdater is filling their system.log with spew? This is happening on systems with and without flash installed. Sign, yet another blunder...

    Linc Davis wrote:
    That's the Flash updater included in Mac OS 10.7.4. It doesn't work on a case-sensitive boot volume, which is what you have.
    com.apple.flashupdat...: Apple Support Communities
    Correct. See this post: https://discussions.apple.com/thread/3952378?tstart=0
    and change your com.apple.flashupdater.plist file. That should take care of it.

  • Deadlock with thread issues while generating reports with Crystal Report XI

    We are facing deadlock with thread issues while generating report with Crystal Report XI
    Version Number is 11.0 and the database used is Oracle
    In the log file on line number 74350  by 2008/12/16 13:35:54 there is a dead lock with Thread: u20184u2019 is waiting to acquire lock for 'com.crystaldecisions.reports.queryengine.av@15214b9' which is held by the Thread: '0'.
    And  a dead lock with Thread: u20180u2019 is waiting to acquire lock for 'com.crystaldecisions.reports.queryengine.av@15214b9' which is held by the Thread: '4'.
    Exactly after 10 minutes we can see the thread 4 and 0 are declared as STUCK by 2008/12/16  13:45:54 .
    Is this an existing issue with Crystal Report?
    Is there some solution for this problem?
    THE LOG FILE INFORMATION IS GIVEN BELOW
    [deadlocked thread] [ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)':
    Thread '[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'' is waiting to acquire lock 'com.crystaldecisions.reports.queryengine.av@15214b9' that is held by thread '[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)''
    Stack trace:
         com.crystaldecisions.reports.queryengine.av.V(Unknown Source)
         com.crystaldecisions.reports.queryengine.av.do(Unknown Source)
         com.crystaldecisions.reports.queryengine.as.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.c(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.b(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.long(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a.b.a(Unknown Source)
         com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
         com.sysarris.aris.crystalreports.RepServlet.generateReport(RepServlet.java:65)
         com.sysarris.aris.crystalreports.RepServlet.doPost(RepServlet.java:40)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
         weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
         weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
         weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
         weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    [deadlocked thread] [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)':
    Thread '[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'' is waiting to acquire lock 'com.crystaldecisions.reports.queryengine.av@12e0415' that is held by thread '[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)''
    Stack trace:
         com.crystaldecisions.reports.queryengine.av.V(Unknown Source)
         com.crystaldecisions.reports.queryengine.av.do(Unknown Source)
         com.crystaldecisions.reports.queryengine.as.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.c(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.b(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.long(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a.b.a(Unknown Source)
         com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
         com.sysarris.aris.crystalreports.RepServlet.generateReport(RepServlet.java:65)
         com.sysarris.aris.crystalreports.RepServlet.doPost(RepServlet.java:40)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
         weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
         weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
         weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
         weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Can you please suggest any work around for this?

    I'm not referring to Servlet threading issues.
    I'll clarify.
    You have two threads, both entering ReportClientDocument.open(...) method.
    Thread 4 is waiting to acquire 'com.crystaldecisions.reports.queryengine.av@15214b9'
    Thread 0 is waiting to acquire ''com.crystaldecisions.reports.queryengine.av@12e0415'
    So I'm thinking ??? are they the same objects?
    My specific question concerning the ReportClientDocument is that both are calling open - i.e., trying to open a new report.  You wouldn't be trying to open different reports using the same ReportClientDocument - so was wondering if you've cached the RCD and trying to open two different reports at the same time on the same instance via different threads.
    You'd normally tie a ReportClientDocument instance to a HTTP Session, to ensure each user gets their own copy.
    Sincerely,
    Ted Ueda

  • ARC1: Unable to archive log 2 thread 1 sequence 28344

    Hi
    We have recently faced a situation that "Can not get Database Connection" when user was trying to connect through Informatica Power Analyzer. I also checked a alert.log file.I found following error in log file
    "ARC1: Unable to archive log 2 thread 1 sequence 28344".
    Can you please give me a solution to this because there is no ORA error inside alert.log file.
    Give me exact steps to resolve this if it is applicable to database.
    Thanks.
    Regards,
    RJ.

    We have recently faced a situation that "Can not get Database Connection" when user was trying to connect through Informatica Power Analyzer. I also checked a alert.log file.I found following error in log file
    "ARC1: Unable to archive log 2 thread 1 sequence 28344".
    Can you please give me a solution to this because there is no ORA error inside alert.log file.
    Give me exact steps to resolve this if it is applicable to database.
    Solution :- Archive log may be stuck. Check disk space .
    start it manually with following command
    alter system archivelog start;
    or
    alter system archivlog to '/abac/dir';
    Cheer

  • Logging by Thread

    Hi,
    I have a multithreaded application. I want to be able to log (with java.util.logging API) messages by thread. How can I achieve that?
    Thanks

    "Logger names can be arbitrary strings..." as the JavaDoc description on java.util.logger.
    So creating seperated loggers for different threads, all you need are different IDs for different threads. What is unique among threads? Thread names.
    --

  • Problem with Thread and InputStream

    Hi,
    I am having a problem with threads and InputStreams. I have a class which
    extends Thread. I have created and started four instances of this class. But
    only one instance finishes its' work. When I check the state of other three
    threads their state remains Runnable.
    What I want to do is to open four InputStreams which are running in four
    threads, which reads from the same url.
    This is what I have written in my thread class's run method,
    public void run()
         URL url = new URL("http://localhost/test/myFile.exe");
    URLConnection conn = url.openConnection();
    InputStream istream = conn.getInputStream();
    System.out.println("input stream taken");
    If I close the input stream at the end of the run method, then other threads
    also works fine. But I do not want to close it becuase I have to read data
    from it later.
    The file(myFile.exe) I am trying to read is about 35 MB in size.
    When I try to read a file which is about 10 KB all the threads work well.
    Plz teach me how to solve this problem.
    I am using JDK 1.5 and Win XP home edition.
    Thanks in advance,
    Chamal.

    I dunno if we should be doing such things as this code does, but it works fine for me. All threads get completed.
    public class ThreadURL implements Runnable
        /* (non-Javadoc)
         * @see java.lang.Runnable#run()
        public void run()
            try
                URL url = new URL("http://localhost:7777/java/install/");
                URLConnection conn = url.openConnection();
                InputStream istream = conn.getInputStream();
                System.out.println("input stream taken by "+Thread.currentThread().getName());
                istream.close();
                System.out.println("input stream closed by "+Thread.currentThread().getName());
            catch (MalformedURLException e)
                System.out.println(e);
                //TODO Handle exception.
            catch (IOException e)
                System.out.println(e);
                //TODO Handle exception.
        public static void main(String[] args)
            ThreadURL u = new ThreadURL();
            Thread t = new Thread(u,"1");
            Thread t1 = new Thread(u,"2");
            Thread t2 = new Thread(u,"3");
            Thread t3 = new Thread(u,"4");
            t.start();
            t1.start();
            t2.start();
            t3.start();
    }And this is the o/p i got
    input stream taken by 2
    input stream closed by 2
    input stream taken by 4
    input stream closed by 4
    input stream taken by 3
    input stream closed by 3
    input stream taken by 1
    input stream closed by 1
    can u paste your whole code ?
    ram.

  • Open task sequence log with cmtrace on error

    Hi,
    Is there a way to make an SCCM 2012 R2 task sequence automatically open the smsts.log (with  cmtrace) when an error occurs?
    J.
    Jan Hoedt

    I would agree with Torstren. The difficult piece would be determining where the smsts.log is, based on where its at in the task sequence. Once you have that it wouldn't be too difficult to place those steps in the
    Gather Logs and StateStore on Failure group. The catch will be, even if CMTrace is open, the machine will still reboot after 15 minutes unless the cmd prompt is also open.

  • Can't update software because a message appears that I have to log with the same Apple ID that was used to purchase them: iMovie, Garage Band

    I can't update software because a message appears that I have to log with the same Apple ID that was used to purchase them: iMovie, Garage Band, iPhoto, but those apps came with OSX Lion.
    How can I get the "original" Apple ID?

    Support Downloads
    http://support.apple.com/downloads/
    Luckily, there is always more than one way to update software.

  • Hi, i got my 4s from my friend.... But when I'm trying to log with iCloud  I get an message like for this phone I can't use any new Apple ID ,... It's like the limit....

    Hi I'm trying to log with a new acc apple ... And in iCloud I'm getting every time an mess like the I already got the max limit of acc for this phone

    Sign in with the Apple ID that is already on the account.
    Disable Find My iPhone.
    Restore the device as new.
    Set up as you desire.

  • Error message when trying to log with more than a mobile account

    Hi guys,
    I face a very strange and worrying problem : when I log with a mobile account against my Snow Leopard Server, it works. But when I try to log with a second mobile using fast user switching, I have a strange error message saying that I can't connect with this user "at the moment". Once I log off from the first mobile account, I can log with the second one...
    It is as if it is not possible to have two or more mobile/network accounts logged simultaneously on the same client. Is this a known problem ?
    Thanks for your help,
    Eric.

    By design or not, this is a flaw, and a huge one ! I wanted to set up my home network so that each member of my family has a portable account. But this stupid design decision makes it impossible, since it makes impossible to have two or more users logged at the same time on a computer. So each time a member of my family wants to log on the family iMac, they have first to ask the previous logged member to log out !
    How is that not a flawed design ? I don't even see what are the pros of that design decision ?

  • Need help with threads?.. please check my approach!!

    Hello frnds,
    I am trying to write a program.. who monitors my external tool.. please check my way of doing it.. as whenever i write programs having thread.. i end up goosy.. :(
    first let me tell.. what I want from program.. I have to start an external tool.. on separate thread.. (as it takes some time).. then it takes some arguments(3 arguments).. from file.. so i read the file.. and have to run tool.. continously.. until there are arguments left.. in file.. or.. user has stopped it by pressing STOP button..
    I have to put a marker in file too.. so that.. if program started again.. file is read from marker postion.. !!
    Hope I make clear.. what am trying to do!!
    My approach is like..
    1. Have two buttons.. START and STOP on Frame..
    START--> pressed
    2. check marker("$" sign.. placed in beginning of file during start).. on file..
         read File from marker.. got 3 arg.. pass it to tool.. and run it.. (on separate thread).. put marker.. (for next reading)
         Step 2.. continously..
    3. STOP--> pressed
         until last thread.. stops.. keep running the tool.. and when last thread stops.. stop reading any more arguments..
    Question is:
    1. Should i read file again and again.. ?.. or read it once after "$" sign.. store data in array.. and once stopped pressed.. read file again.. and put marker ("$" sign) at last read line..
    2. how should i know when my thread has stopped.. so I start tool again??.. am totally confused.. !!
    please modify my approach.. if u find anything odd..
    Thanks a lot in advance
    gervini

    Hello,
    I have no experience with threads or with having more than run "program" in a single java file. All my java files have the same structure. This master.java looks something like this:
    ---master.java---------------------------------------------------
    import java.sql.*;
    import...
    public class Master {
    public static void main(String args []) throws SQLException, IOException {
    //create connection pool here
    while (true) { // start loop here (each loop takes about five minutes)
    // set values of variables
    // select a slave process to run (from a list of slave programs)
    execute selected slave program
    // check for loop exit value
    } // end while loop
    System.out.println("Program Complete");
    } catch (Exception e) {
    System.out.println("Error: " + e);
    } finally {
    if (rSet1 != null)
    try { rSet1.close(); } catch( SQLException ignore ) { /* ignored */ }
    connection.close();
    -------end master.java--------------------------------------------------------
    This master.java program will run continuously for days or weeks, each time through the loop starting another slave process which runs for five minutes to up to an hour, which means there may be ten to twenty of these slave processes running simultaneously.
    I believe threads is the best way to do this, but I don't know where to locate these slave programs: either inside the master.java program or separate slave.java files? I will need help with either method.
    Your help is greatly appreciated. Thank you.
    Logan

  • Question  about dynamic class loading with thread built in

    Hi ,
    I am trying to load a class with a thread built in from the network.
    I write my network classloader, convert the class to a byte array and transmit over the network using socket. This step seems fine but when I tried to load the class at the receiver, some exception happens,"
    the reported exception is that :
    Exception in thread "Thread-2" java.lang.NoClassDefFoundError: SampleProject/Application$1
    my class name is "SampleProject . Application", the $1 I think it may refers to the thread built in the "Application".
    Could any one give me some hint for how to dynamic load such class file with thread built in over the network?
    Thank you!
    Best Regards,
    Song Guo

    Exception in thread "Thread-2"
    java.lang.NoClassDefFoundError:
    SampleProject/Application$1That means that the receiving end can't find an anonymous inner class which you have in the Application class. (The anonymous clas is given the synthetic name 1). Check your bin/classes folder you will have a class there with the name Application$1.class
    Kaj

  • Want to Generate custom logs with Log4J within Java Embedding activity

    Hi Gurus,
    i want to Generate custom logs with Log4J within Java Embedding activity. For that i have performed some steps, but the log file has not been created.
    ServerSide Configuration:
    *===============*
    1. I have copied the log4j-1.2.15.jar file to the "oracle.soa.ext_11.1.1" location and recreate the oracle.soa.ext.jar file using an-script, which appends the log4j.jar file to the classpath.( That was created successfully)
    2. Specify a File location in log4j.xml for creating the log file. (e.g. (<middleware_home>/config/customLog.log)
    3. Then create a folder and add log4j.xml and log4j.dtd file under the folder.
    4. Modify the startManagedWeblogicServer by adding JAVA_OPTIONS="-Dlog4j.configuration=<middleware_home>/config/log4j.debug.xml”
    5. Then restart the SOA server.
    log4j.xml :
    I have used fileAppender.
    DevelopmentSide Configuration:
    *===================*
    1. Create synchronous BPEL process and Add "JAVA Embedding Activity" inbetween receiveInput and replyOutput activity.
    2.Import the log4j-1.2.15.jar to the project libs
    3.In the BPEL source code, import the Logger class.
    4.Insert the code in the JAVA Embedding Activity
    Logger logger = Logger.getLogger("CustomLog");
    logger.info("CustomeLog " + getTitle());
    Compile and deploy the project into the SOA_server and test it. Test status is completed but log is not created in the mentioned location.
    Ref: http://blog.andrade.inf.br/search/label/Log4j
    Is there any other way to achieve this requirement. Please suggest.
    Thanks in Advance,
    Sharmistha

    You can try this.
    http://veejai24.blogspot.co.uk/2008/04/simple-way-to-implement-log4j-in-your.html
    Thanks,
    Vijay

  • GD causing program to die with threading

    I've been working on a fractal generator for the past few days and decided to add multithreading support tonight—just one problem, this code works perfectly without threads, and not all with threads:
    Works:
    thread_options_t *toptions = (thread_options_t*)malloc(sizeof(thread_options_t));
    toptions->ioptions = ioptions;
    toptions->foptions = foptions;
    init_gd(&toptions->ioptions);
    fractal_main_loop(toptions->foptions, toptions->ioptions);
    save_set(toptions->ioptions);
    Doesn't work:
    thread_options_t *toptions = (thread_options_t*)malloc(sizeof(thread_options_t));
    toptions->ioptions = ioptions;
    toptions->foptions = foptions;
    pthread_t threadid;
    pthread_create(&threadid, NULL, spawn_fractal_generator, (thread_options_t*)toptions);
    Where spawn_fractal_generator is this function:
    void *spawn_fractal_generator(void* arg)
    thread_options_t *toptions = (thread_options_t*)arg;
    init_gd(&toptions->ioptions);
    fractal_main_loop(toptions->foptions, toptions->ioptions);
    save_set(toptions->ioptions);
    pthread_exit(0);
    I've found that it's the init_gd() call which is failing, init_gd() is this:
    void init_gd(image_options_t *ioptions)
    ioptions->gd.im = gdImageCreateTrueColor(ioptions->image.width, ioptions->image.height);
    Putting printfs before and after the call to gdImageCreateTrueColor() shows that the program just dies somewhere in that call: but with no error message and with a return code of 0.
    Last edited by Barrucadu (2010-02-10 21:10:36)

    I noticed something similar after some update or other on one machine using threads in python. Could it be a glibc problem?

  • Design issue with threads ...

    Hello,
    I need your thoughts in how to proper use java threads in solving this issue:
    * I have an application that query a database for a list of users, and for each row retrieved from the database as a result the application should process that user and send him an email.
    Now the procdural approach for looping each user and send him an email at a time is not convinient as the number of users is big (20,000 users or more) so I thought of why not to use threads to send say every 300 user at a time (i.e, creating 300 threads), but the problem is that I cannot really figure how to manage those threads, to make sure that there are 300 threads are running all the time, and what if a thread was taking more time that the others ... etc.
    So, is this approach is the right one, and can you guide more more for how to control the threads this way, if not what do you suggest?
    Your guidance is highly appreciated,
    tamer

    I'm not sure that threads will help your cause. But they could. Let me explain:
    Threads have several purposes. Two instantly spring to mind:
    1. to make things faster.
    2. to (make it seem like you) do two (or more things) at once.
    First #2. This is often a usability issue. For example, a web server has to server multiple clients at the "same time". This is often done with threads - it gives the illusion that many concurrent users are supported. In reality the CPU/JVM is swapping beween the different requests. More CPUs allow for "realer" concurrency. Speed is only a by-product here.
    Now #1: Make things faster. Threading works well for speed when the tasks being done differ.
    For example, consider human multithreading: ask me to whistle for 5 seconds, and 5 seconds later I'll be done. Then ask me to scratch my head with both hands for 5 seconds, and 5 seconds later I'll be done. Total: 10 seconds. Ask me to do both at the same time. Result: 5 seconds later I'll have scratched my head and whistled for 5 seconds. 50% time saving.
    However, ask me to touch type for 5 seconds, and scratch my head for 5 seconds, it'll take 10 seconds or more. If you ask me to do one, then the other, I can spend 5 seconds at one then the other - total 10 seconds. Ask me to do both concurrently, and I'll take more than 10 seconds, as I'll be moving my hands back and forth from the keyboard to my head, and vice-versa.
    I have a feeling that running multiple threads in your case would be like asking you to scratch your head and scratch your head all at the same time. But this may not strictly hold true for several reasons:
    1. your DB should scale, i.e. handle two simultaneous requests faster than two concurrent requests. However, this will probably not be true of 300 simultaneous requests being faster than 300 concurrent (or 50 * 6-concurrent requests).
    2. if you are in a multi-CPU environment then some concurrentcy improvements would be expected (more hands for head scratching).
    3. your application does two things: reads a DB and sends a mail. While sending one mail, you should be albe to concurrently read the next record. i.e. concurrency is supported here, as you don't have resource contention here.
    So, you will probably get some benefit from threads. Adding too many will only slow you down, as there'll be too much time spend task switching, as you'll suffer resource contenion on the DB/mail server.
    I suggest that you run your program with several configurations, i.e. number of threads, and see what one gives the best results. For fast results, I'd suggests trying the following number of threads:
    1, 2, 4, 8, 16, 32, 64, 128, 256, ...
    when things start to slow down, you know where to search for your optimum thread number. You could also do with profiling your application if speed is a very pressing issue.
    Finally, one clarification: this is not OO. You could do multi-threading in a procedural environment.
    Good luck.
    if you are running on a multi-CPU environment, then the DB

Maybe you are looking for

  • Iphone 5 with IO7 won't recharge now USB

    Long story short. Will my iPhone 5 wouldn't sync with iTunes. It was stuck on waiting for changes to apply. So I read on another discussion post that I should just restore. So I hit the restore button on iTunes and it said connect with a USB cable. W

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi, I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also,

  • Up date address details

    Hi all, i am facing a problem to update address details such as name1 and name2. more clear : already adress number exist and i need to up date name1 and name2 fields only . if any body have idea pls share with me. this details belongs to equipment.

  • HT4410 Installing Microsoft Office on MacBook Air?

    I currently have microsoft office 2011 installed on my macbook. I recently purchased a macbook air and cannot figure out how to install it on the Air as it does not have a disc drive. Can anyone help me with this process?

  • Ipod touch is black. It will not charge. It will not turn on.

    Ipod will not turn on. Black screen. Will not charge. It's only 6mths old.