Exemplo n.º 1
0
        /// <summary>
        /// Whether an incoming message can interleave
        /// </summary>
        /// <param name="targetActivation"></param>
        /// <param name="incoming"></param>
        /// <returns></returns>
        public bool CanInterleave(ActivationData targetActivation, Message incoming)
        {
            bool canInterleave =
                catalog.IsReentrantGrain(targetActivation.ActivationId) ||
                incoming.IsAlwaysInterleave ||
                targetActivation.Running == null ||
                (targetActivation.Running.IsReadOnly && incoming.IsReadOnly);

            return(canInterleave);
        }