<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import
import gevent

from . import RPCServer


class RPCServerGreenlets(RPCServer):
    # documentation in docs because of dependencies
    def _spawn(self, func, *args, **kwargs):
        gevent.spawn(func, *args, **kwargs)<commit_msg>Add a start method to the gevent servers so you can run multiple servers and do a joinall for all of them.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import
import gevent

from . import RPCServer


class RPCServerGreenlets(RPCServer):
    # documentation in docs because of dependencies
    def _spawn(self, func, *args, **kwargs):
        gevent.spawn(func, *args, **kwargs)

    def start(self):
        '''
        Create a Greenlet with serve_forever so you can do a gevenet.joinall of 
        several RPCServerGreenlets  
        '''
        return gevent.spawn(self.serve_forever)
{'fraction_non_alphanumeric': 0.09617373319544985, 'fraction_numerical': 0.002068252326783868, 'mean_word_length': 3.4, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '889744', 'n_tokens_mistral': 295, 'n_tokens_neox': 285, 'n_words': 96}