On Mon, Jan 19, 2015 at 03:49:21PM +0800, yewgang wrote:
> Now for some reason I have to write codes like this (My program perform
> ovsdb-client):
>
> LOOP {
> ........
> important task every 2 second;
> ovsdb_idl_txn_commit_block(txn);
> ........
> }
>
> If ovsdb-server is OK, ovsdb_idl_txn_commit_block will not block; but if
> ovsdb-server is blocked or network is blocked, Is there any possible for my
> program blocking at *poll_block()* (in ovsdb_idl_txn_commit_block function)
> for long time ?
If it takes a long time for a network response, then, yes, poll_block()
could block for 2 seconds or more.
If you need faster response than that then you probably shouldn't use
ovsdb_idl_txn_commit_block(). Use ovsdb_idl_txn_commit() and
poll_block() by hand, plus poll_timer_wait() or poll_timer_wait_until()
to ensure that poll_block() wakes up by your deadline.
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss