cpp/thread/packaged task/swap

Exchanges the shared states and stored tasks of and.

Return value
(none)