@@ -54,9 +54,9 @@ def find_shared_library(self, shared_library_name):
54
54
return find_library (
55
55
shared_library_name .replace ("lib" , "" ).replace (".so" , "" ))
56
56
57
- def load_dll_copy (self ):
58
- """Load a new copy of the shared library."""
59
- # Copy the library file to a new location so we can load the copy .
57
+ def create_library_copy (self ):
58
+ """Create a new copy of the shared library."""
59
+ # Copy the library file to a new (temp) location .
60
60
temp_directory = tempfile .gettempdir ()
61
61
copy_number = len (self .filenames )
62
62
new_filename = os .path .join (
@@ -73,14 +73,14 @@ def load_dll_copy(self):
73
73
74
74
def next_player_index (self , name ):
75
75
"""Determine the index of the next free shared library copy to
76
- allocate for the player. If none is available then load another copy."""
76
+ allocate for the player. If none is available then make another copy."""
77
77
# Is there a free index?
78
78
if len (self .player_next [name ]) > 0 :
79
79
return self .player_next [name ].pop ()
80
80
# Do we need to load a new copy?
81
81
player_count = len (self .player_indices [name ])
82
82
if player_count == len (self .filenames ):
83
- self .load_dll_copy ()
83
+ self .create_library_copy ()
84
84
return player_count
85
85
# Find the first unused index
86
86
for i in range (len (self .filenames )):
@@ -89,8 +89,8 @@ def next_player_index(self, name):
89
89
raise ValueError ("We shouldn't be here." )
90
90
91
91
def get_filename_for_player (self , name ):
92
- """For a given player return a copy of the shared library for use
93
- in a Player class, along with an index for later releasing."""
92
+ """For a given player return a filename for a copy of the shared library
93
+ for use in a Player class, along with an index for later releasing."""
94
94
index = self .next_player_index (name )
95
95
self .player_indices [name ].add (index )
96
96
if self .verbose :
0 commit comments