summaryrefslogtreecommitdiff
path: root/ace/SUN_Proactor.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-01-19 04:53:34 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-01-19 04:53:34 +0000
commit4d93da6bf670686be5d33647201b838e802bcd0e (patch)
tree25fa11287f7f6140f9ef72ddf040e4e87a727632 /ace/SUN_Proactor.cpp
parentb0eb6240d81cd2fe2d467621b00e9e5480fc1039 (diff)
downloadATCD-4d93da6bf670686be5d33647201b838e802bcd0e.tar.gz
ChangeLogTag:Thu Jan 18 12:49:53 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'ace/SUN_Proactor.cpp')
-rw-r--r--ace/SUN_Proactor.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/ace/SUN_Proactor.cpp b/ace/SUN_Proactor.cpp
index f341bce521d..1610eb2dd46 100644
--- a/ace/SUN_Proactor.cpp
+++ b/ace/SUN_Proactor.cpp
@@ -280,33 +280,33 @@ ACE_SUN_Proactor::start_aio (ACE_POSIX_Asynch_Result *result)
}
int
-ACE_SUN_Proactor::cancel_aiocb (ACE_POSIX_Asynch_Result * result)
+ACE_SUN_Proactor::cancel_aiocb (ACE_POSIX_Asynch_Result *result)
{
ACE_UNUSED_ARG (result);
- return 2 ; // not implemented
-
-// AL
-// I tried to implement the following code
-// But result was : aiocancel returned -1 with errno=ACCESS_DENIED
-// moreover, later this operation had been never finished
-// on aiowait .
-// Is it Sun error ??
-//
-// So with SUN_Proactor there is only one way to cancel AIO
-// just close the file handle.
-//
-//
-// int rc = ::aiocancel (& result->aio_resultp);
-//
-// Check the return value and return 0/1/2 appropriately.
-// if (rc == 0) // AIO_CANCELED
-// return 0;
-//
-// ACE_ERROR_RETURN ((LM_ERROR,
-// "%N:%l:(%P | %t)::%p\n",
-// "cancel_aiocb:"
-// "Unexpected result from <aiocancel>"),
-// -1);
+ // Force I/O completion.
+ ACE::set_flags (result->aio_fildes, ACE_NONBLOCK);
+
+ return 2;
+ // AL
+ // I tried to implement the following code but result was:
+ // aiocancel returned -1 with errno=ACCESS_DENIED moreover, later
+ // this operation had been never finished on aiowait . Is it Sun
+ // error ??
+ //
+ // So with SUN_Proactor there is only one way to cancel AIO just
+ // close the file handle.
+ //
+ // int rc = ::aiocancel (& result->aio_resultp);
+ //
+ // Check the return value and return 0/1/2 appropriately.
+ // if (rc == 0) // AIO_CANCELED
+ // return 0;
+ //
+ // ACE_ERROR_RETURN ((LM_ERROR,
+ // "%N:%l:(%P | %t)::%p\n",
+ // "cancel_aiocb:"
+ // "Unexpected result from <aiocancel>"),
+ // -1);
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)