Honoring timeout for sync operations.

This closes #1242.