How to implement an async-function?

Discussion in 'C++' started by alex, Apr 4, 2006.

  1. alex

    alex Guest

    I want to implement an async-function,just like Oracle OCI function:

    for example:

    I call oci "execute(strSQL)" function, and I can call "cancle"
    function to cancle the process if the SQL execute too long.

    How to implement the execute and cancle functions?

    thx!
     
    alex, Apr 4, 2006
    #1
    1. Advertising

  2. alex

    Ian Collins Guest

    alex wrote:
    > I want to implement an async-function,just like Oracle OCI function:
    >
    > for example:
    >
    > I call oci "execute(strSQL)" function, and I can call "cancle"
    > function to cancle the process if the SQL execute too long.
    >
    > How to implement the execute and cancle functions?
    >

    Lookup threading on your platform.

    --
    Ian Collins.
     
    Ian Collins, Apr 4, 2006
    #2
    1. Advertising

  3. alex

    benben Guest

    Ian Collins wrote:
    > alex wrote:
    >> I want to implement an async-function,just like Oracle OCI function:
    >>
    >> for example:
    >>
    >> I call oci "execute(strSQL)" function, and I can call "cancle"
    >> function to cancle the process if the SQL execute too long.
    >>
    >> How to implement the execute and cancle functions?
    >>

    > Lookup threading on your platform.
    >


    In addition to threading there are other possibilities, some employ
    concurrency and some don't.

    For example you can launch a server process and send signals,
    alternatively, if the program involves a message pump you can chop the
    task into small chunks and use the message system for non-concurrent
    execution.

    Regards,
    Ben
     
    benben, Apr 4, 2006
    #3
  4. alex

    Jim Langston Guest

    "alex" <> wrote in message
    news:...
    >I want to implement an async-function,just like Oracle OCI function:
    >
    > for example:
    >
    > I call oci "execute(strSQL)" function, and I can call "cancle"
    > function to cancle the process if the SQL execute too long.
    >
    > How to implement the execute and cancle functions?
    >
    > thx!


    One way would be to do the execute(strSQL) function in it's own thread. You
    can discuss this option in comp.programming.threads. There may be other
    ways.
     
    Jim Langston, Apr 4, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dong seok huh

    [Q] : async event counter

    dong seok huh, Oct 1, 2003, in forum: VHDL
    Replies:
    6
    Views:
    761
    Renaud Pacalet
    Oct 6, 2003
  2. Arnaud
    Replies:
    3
    Views:
    892
    Peter Alfke
    Jun 28, 2004
  3. xz
    Replies:
    2
    Views:
    399
    James Kanze
    Mar 14, 2008
  4. Lucas Tam
    Replies:
    0
    Views:
    115
    Lucas Tam
    Apr 13, 2005
  5. Steven
    Replies:
    0
    Views:
    375
    Steven
    Nov 30, 2005
Loading...

Share This Page