This behavior also caught me at the C API. I was expecting sqlite to block on contention and continue when available but it just gives up. I resorted to wrapping my sqlite use in a rwlock of my own, but that is a less than general solution.
sqlite also provides sqlite3_busy_timeout() and sqlite3_busy_handler() to customize its contention handling behavior.