1# Copyright 2018 gRPC authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15
16import threading
17
18# No-op implementations for Windows.
19
20def fork_handlers_and_grpc_init():
21    grpc_init()
22
23
24class ForkManagedThread(object):
25    def __init__(self, target, args=()):
26        self._thread = threading.Thread(target=target, args=args)
27
28    def setDaemon(self, daemonic):
29        self._thread.daemon = daemonic
30
31    def start(self):
32        self._thread.start()
33
34    def join(self):
35        self._thread.join()
36
37
38def block_if_fork_in_progress(postfork_state_to_reset=None):
39    pass
40
41
42def enter_user_request_generator():
43    pass
44
45
46def return_from_user_request_generator():
47    pass
48
49
50def get_fork_epoch():
51    return 0
52
53
54def is_fork_support_enabled():
55    return False
56
57
58def fork_register_channel(channel):
59    pass
60
61
62def fork_unregister_channel(channel):
63    pass
64