@@ -88,6 +88,7 @@ import Control.Distributed.Process.Internal.CQueue
8888 , enqueue
8989 , newCQueue
9090 , mkWeakCQueue
91+ , queueSize
9192 )
9293import qualified Network.Transport as NT
9394 ( Transport
@@ -974,10 +975,11 @@ ncEffectGetInfo from pid =
974975 case mProc of
975976 Nothing -> dispatch (isLocal node (ProcessIdentifier from))
976977 from node (ProcessInfoNone DiedUnknownId)
977− Just _ -> do
978+ Just proc -> do
978979 itsLinks <- gets (^. linksFor them)
979980 itsMons <- gets (^. monitorsFor them)
980981 registered <- gets (^. registeredHere)
982+ size <- liftIO $ queueSize $ processQueue $ proc
981983
982984 let reg = registeredNames registered
983985 dispatch (isLocal node (ProcessIdentifier from))
@@ -986,8 +988,7 @@ ncEffectGetInfo from pid =
986988 ProcessInfo {
987989 infoNode = (processNodeId pid)
988990 , infoRegisteredNames = reg
989− -- we cannot populate this field
990− , infoMessageQueueLength = Nothing
991+ , infoMessageQueueLength = size
991992 , infoMonitors = Set.toList itsMons
992993 , infoLinks = Set.toList itsLinks
993994 }