How to implement an async-function?

A

alex

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!
 
I

Ian Collins

alex said:
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.
 
B

benben

Ian said:
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
 
J

Jim Langston

alex said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top