Message Boards Message Boards

2
|
4831 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

LibraryLink: How to use a WSTP connection when an abort is in progress?

Posted 9 years ago
POSTED BY: Szabolcs Horvát
2 Replies

Thank you for the response. This confirms that I should check libData->AbortQ() before trying to use the link form getWSLINK().

Just a short explanation of how I ended up (inadvertently) trying to use the link in the middle of an abort:

I am working on an igraph LibraryLink interface. All igraph functions return an error code (just like MathLink functions). I wrapped them all in a function that checks the error code and reports any errors. The reporting is done by calling Message through getWSLINK, almost exactly like in the documentation example here. At a later point I added abort support. igraph functions will return an error code when aborted, so due to how things were set up, my program attempted to report this by calling Message through WSTP. Now I just check for aborts at the beginning of the message function.

POSTED BY: Szabolcs Horvát
POSTED BY: John Fultz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract