Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add a fib function sample to show how to implement timeout #30

Closed
femtotrader opened this issue Jun 26, 2014 · 6 comments
Closed

Add a fib function sample to show how to implement timeout #30

femtotrader opened this issue Jun 26, 2014 · 6 comments
Milestone

Comments

@femtotrader
Copy link
Contributor

Hello,

I think you should use a Fibonnacci function as RPC example

def fib(n):
    """Fibonacci function"""
    if n == 0:
        return 0
    elif n == 1:
        return 1
    else:
        return fib(n-1) + fib(n-2)

Such an example could should how to use timeout (either on client side or on server side) because calculating fib(5) is quite short but fib(20) or fib(25) is much longer.

Kind regards

@skudriashev
Copy link
Collaborator

Hi,

Can you, please, do a PR, so we will merge it.

Thanks!

@femtotrader
Copy link
Contributor Author

Hi,

I don't know how to manage timeout with callme so I won't be able to do the requested PR until I get more informations.

Kind regards

@skudriashev
Copy link
Collaborator

@femtotrader, just use the timeout parameter for a client.

@femtotrader
Copy link
Contributor Author

Thanks for your reply. Is there a wait to limit execution time on server side ?

@skudriashev
Copy link
Collaborator

@femtotrader, nope, only for a client.

@skudriashev
Copy link
Collaborator

PR merged.

@ceelian ceelian added this to the v0.2 milestone Jul 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants