<commit_before>using System;
using Akka.Actor;

namespace SignalRMeetsAkka.Hubs
{
    public class TestHub : LifeCycleLoggerHub
    {
        private readonly ActorSystem _actorSystem = ServiceLocator.Resolve<ActorSystem>();
        private readonly MessageMapper _mapper = ServiceLocator.Resolve<MessageMapper>();

        private string CreateFullPath(string actorPath)
        {
            return "akka://" + _actorSystem.Name + "/user" + actorPath;
        }

        public void Send(string path, object obj, string messageTypeName)
        {
            var message = _mapper.Map(obj, messageTypeName);
            var fullPath = CreateFullPath(path);
            _actorSystem.ActorSelection(fullPath).Tell(message);
        }

        public void Ask(string path, object obj, string messageTypeName, string messageId)
        {
            var message = _mapper.Map(obj, messageTypeName);
            var fullPath = CreateFullPath(path);
            var result = _actorSystem.ActorSelection(fullPath)
                                     .Ask(message).Result;
            //hub.client.tell does not work, beware
            Clients.Caller.answer(result, messageId);
        }
    }
}<commit_msg>Removed waiting for result from the Hub [ContinueWith instead]<commit_after>using System;
using Akka.Actor;

namespace SignalRMeetsAkka.Hubs
{
    public class TestHub : LifeCycleLoggerHub
    {
        private readonly ActorSystem _actorSystem = ServiceLocator.Resolve<ActorSystem>();
        private readonly MessageMapper _mapper = ServiceLocator.Resolve<MessageMapper>();

        private string CreateFullPath(string actorPath)
        {
            return "akka://" + _actorSystem.Name + "/user" + actorPath;
        }

        public void Send(string path, object obj, string messageTypeName)
        {
            var message = _mapper.Map(obj, messageTypeName);
            var fullPath = CreateFullPath(path);
            _actorSystem.ActorSelection(fullPath).Tell(message);
        }

        public void Ask(string path, object obj, string messageTypeName, string messageId)
        {
            var message = _mapper.Map(obj, messageTypeName);
            var fullPath = CreateFullPath(path);
            var caller = Clients.Caller;
            _actorSystem.ActorSelection(fullPath)
                .Ask(message).ContinueWith((result) =>
                {
                    caller.answer(result, messageId);
                });
        }
    }
}
{'fraction_non_alphanumeric': 0.08600405679513184, 'fraction_numerical': 0.0, 'mean_word_length': 2.2923898531375166, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2991790', 'n_tokens_mistral': 649, 'n_tokens_neox': 630, 'n_words': 150}