@@ -1385,6 +1385,26 @@ testUnsafeSend TestTransport{..} = do
1385
1385
1386
1386
takeMVar clientDone
1387
1387
1388
+ testUnsafeUSend :: TestTransport -> Assertion
1389
+ testUnsafeUSend TestTransport {.. } = do
1390
+ serverAddr <- newEmptyMVar
1391
+ clientDone <- newEmptyMVar
1392
+
1393
+ localNode <- newLocalNode testTransport initRemoteTable
1394
+ void $ forkProcess localNode $ do
1395
+ self <- getSelfPid
1396
+ liftIO $ putMVar serverAddr self
1397
+ clientAddr <- expect
1398
+ unsafeUSend clientAddr ()
1399
+
1400
+ void $ forkProcess localNode $ do
1401
+ serverPid <- liftIO $ takeMVar serverAddr
1402
+ getSelfPid >>= unsafeUSend serverPid
1403
+ () <- expect
1404
+ liftIO $ putMVar clientDone ()
1405
+
1406
+ takeMVar clientDone
1407
+
1388
1408
testUnsafeNSend :: TestTransport -> Assertion
1389
1409
testUnsafeNSend TestTransport {.. } = do
1390
1410
clientDone <- newEmptyMVar
@@ -1539,6 +1559,7 @@ tests testtrans = return [
1539
1559
, testCase " TextCallLocal" (testCallLocal testtrans)
1540
1560
-- Unsafe Primitives
1541
1561
, testCase " TestUnsafeSend" (testUnsafeSend testtrans)
1562
+ , testCase " TestUnsafeUSend" (testUnsafeUSend testtrans)
1542
1563
, testCase " TestUnsafeNSend" (testUnsafeNSend testtrans)
1543
1564
, testCase " TestUnsafeSendChan" (testUnsafeSendChan testtrans)
1544
1565
-- usend
0 commit comments