Results 1 to 3 of 3

Thread: Can I interrupt a synchronous invocation?

  1. #1
    myrosia is offline Registered User
    Name: Myroslava Dzikovska
    Organization: University of Edinburgh
    Project: tutorial dialogue system
    Join Date
    Oct 2009
    Posts
    29

    Can I interrupt a synchronous invocation?

    I am working on an ICE interface that will be used in conjunction with a user GUI. Most of the time, the GUI will dispatch a call and wait for a reply from the server. But server-side processing can take up to 3 minutes, and occasionally we may want to give the users opportunity to say "ok, forget about it, let's move on". Doing a fixed time-out is not quite suitable for this application, I don't think we can come up with a value that will suit all users.

    I can obviously do it as two one-way invocations, but this is a bit of a hassle, because one would have to be quite careful keeping track which returns match up to which callouts. Is there a way to interrupt a synchronous invocation in the middle of execution?

    Thanks,

    Myrosia

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi,

    No, you can't interrupt a synchronous invocation. I recommend that you use an asynchronous invocation in this situation. Note that you may need to notify your AMI callback so that it ignores the response that Ice will eventually deliver.

    Regards,
    Mark

  3. #3
    myrosia is offline Registered User
    Name: Myroslava Dzikovska
    Organization: University of Edinburgh
    Project: tutorial dialogue system
    Join Date
    Oct 2009
    Posts
    29
    Thanks, this make sense! I noticed the oneway invocation, but somehow I missed the information about asynchronous invocation in the manual. This looks exactly like what I need.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-16-2009, 01:23 PM
  2. How to handle java.lang.Thread.interrupt() in a safe way?
    By Markus Bernhard in forum Help Center
    Replies: 4
    Last Post: 06-28-2008, 11:29 AM
  3. Adding Invocation Context
    By crackajaxx in forum Comments
    Replies: 2
    Last Post: 05-26-2005, 12:15 AM
  4. Asynchronous invocation
    By stephan in forum Help Center
    Replies: 5
    Last Post: 04-21-2004, 08:30 AM
  5. object invocation problem
    By istvan in forum Help Center
    Replies: 4
    Last Post: 11-26-2003, 11:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •