avoid locking when message queue is empty in websocket
replace tabs with spaces.
Merge pull request #9173 from 2youyouo2/v3

improve ActionTimeline api
Merge pull request #8922 from TimothyZhang/do-not-lock-when-no-message-in-websocket

avoid locking when message queue is empty in websocket