Skip to main content
S3NS
Documentation Technology areas
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Networking
  • Observability and monitoring
  • Security
  • Storage
Cross-product tools
  • Access and resources management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
/
Sign in
  • Python
Overview Guides Reference
S3NS
  • Documentation
    • Overview
    • Guides
    • Reference
  • Technology areas
    • More
  • Cross-product tools
    • More
  • Overview
  • Library reference docs
  • BigQuery DataFrames
  • google-cloud-aiplatform
  • google-cloud-apihub
  • google-cloud-apphub
  • google-cloud-artifact-registry
  • google-cloud-asset
  • google-cloud-bigquery
  • google-cloud-bigquery-storage
  • google-cloud-bigtable
  • google-cloud-chronicle
  • google-cloud-cloudcontrolspartner
  • google-cloud-commerce-consumer-procurement
  • google-cloud-compute
  • google-cloud-containeranalysis
  • google-cloud-core
  • google-cloud-data-qna
  • google-cloud-datacatalog
  • google-cloud-datacatalog-lineage
  • google-cloud-dataplex
  • google-cloud-dataproc
    • Overview
    • Changelog
    • Multiprocessing
    • 2.0.0 Migration Guide
    • Dataproc V1
      • autoscaling_policy_service
        • Overview
        • pagers
          • Overview
          • ListAutoscalingPoliciesAsyncPager
          • ListAutoscalingPoliciesPager
        • AutoscalingPolicyServiceAsyncClient
        • AutoscalingPolicyServiceClient
      • batch_controller
        • Overview
        • pagers
          • Overview
          • ListBatchesAsyncPager
          • ListBatchesPager
        • BatchControllerAsyncClient
        • BatchControllerClient
      • cluster_controller
        • Overview
        • pagers
          • Overview
          • ListClustersAsyncPager
          • ListClustersPager
        • ClusterControllerAsyncClient
        • ClusterControllerClient
      • job_controller
        • Overview
        • pagers
          • Overview
          • ListJobsAsyncPager
          • ListJobsPager
        • JobControllerAsyncClient
        • JobControllerClient
      • workflow_template_service
        • Overview
        • pagers
          • Overview
          • ListWorkflowTemplatesAsyncPager
          • ListWorkflowTemplatesPager
        • WorkflowTemplateServiceAsyncClient
        • WorkflowTemplateServiceClient
      • types
        • Overview
        • AcceleratorConfig
        • AutoscalingConfig
        • AutoscalingPolicy
          • Overview
          • LabelsEntry
        • AuxiliaryServicesConfig
        • BasicAutoscalingAlgorithm
        • BasicYarnAutoscalingConfig
        • Batch
          • Overview
          • LabelsEntry
          • State
          • StateHistory
        • BatchOperationMetadata
          • Overview
          • BatchOperationType
          • LabelsEntry
        • CancelJobRequest
        • Cluster
          • Overview
          • LabelsEntry
        • ClusterConfig
        • ClusterMetrics
          • Overview
          • HdfsMetricsEntry
          • YarnMetricsEntry
        • ClusterOperation
        • ClusterOperationMetadata
          • Overview
          • LabelsEntry
        • ClusterOperationStatus
          • Overview
          • State
        • ClusterSelector
          • Overview
          • ClusterLabelsEntry
        • ClusterStatus
          • Overview
          • State
          • Substate
        • Component
        • ConfidentialInstanceConfig
        • CreateAutoscalingPolicyRequest
        • CreateBatchRequest
        • CreateClusterRequest
        • CreateWorkflowTemplateRequest
        • DataprocMetricConfig
          • Overview
          • Metric
          • MetricSource
        • DeleteAutoscalingPolicyRequest
        • DeleteBatchRequest
        • DeleteClusterRequest
        • DeleteJobRequest
        • DeleteWorkflowTemplateRequest
        • DiagnoseClusterRequest
        • DiagnoseClusterResults
        • DiskConfig
        • EncryptionConfig
        • EndpointConfig
          • Overview
          • HttpPortsEntry
        • EnvironmentConfig
        • ExecutionConfig
        • FailureAction
        • GceClusterConfig
          • Overview
          • MetadataEntry
          • PrivateIpv6GoogleAccess
        • GetAutoscalingPolicyRequest
        • GetBatchRequest
        • GetClusterRequest
        • GetJobRequest
        • GetWorkflowTemplateRequest
        • GkeClusterConfig
        • GkeNodePoolConfig
          • Overview
          • GkeNodeConfig
          • GkeNodePoolAcceleratorConfig
          • GkeNodePoolAutoscalingConfig
        • GkeNodePoolTarget
          • Overview
          • Role
        • HadoopJob
          • Overview
          • PropertiesEntry
        • HiveJob
          • Overview
          • PropertiesEntry
          • ScriptVariablesEntry
        • IdentityConfig
          • Overview
          • UserServiceAccountMappingEntry
        • InstanceGroupAutoscalingPolicyConfig
        • InstanceGroupConfig
          • Overview
          • Preemptibility
        • InstantiateInlineWorkflowTemplateRequest
        • InstantiateWorkflowTemplateRequest
          • Overview
          • ParametersEntry
        • Job
          • Overview
          • LabelsEntry
        • JobMetadata
        • JobPlacement
          • Overview
          • ClusterLabelsEntry
        • JobReference
        • JobScheduling
        • JobStatus
          • Overview
          • State
          • Substate
        • KerberosConfig
        • KubernetesClusterConfig
        • KubernetesSoftwareConfig
          • Overview
          • ComponentVersionEntry
          • PropertiesEntry
        • LifecycleConfig
        • ListAutoscalingPoliciesRequest
        • ListAutoscalingPoliciesResponse
        • ListBatchesRequest
        • ListBatchesResponse
        • ListClustersRequest
        • ListClustersResponse
        • ListJobsRequest
          • Overview
          • JobStateMatcher
        • ListJobsResponse
        • ListWorkflowTemplatesRequest
        • ListWorkflowTemplatesResponse
        • LoggingConfig
          • Overview
          • DriverLogLevelsEntry
          • Level
        • ManagedCluster
          • Overview
          • LabelsEntry
        • ManagedGroupConfig
        • MetastoreConfig
        • NodeGroupAffinity
        • NodeInitializationAction
        • OrderedJob
          • Overview
          • LabelsEntry
        • ParameterValidation
        • PeripheralsConfig
        • PigJob
          • Overview
          • PropertiesEntry
          • ScriptVariablesEntry
        • PrestoJob
          • Overview
          • PropertiesEntry
        • PySparkBatch
        • PySparkJob
          • Overview
          • PropertiesEntry
        • QueryList
        • RegexValidation
        • ReservationAffinity
          • Overview
          • Type
        • RuntimeConfig
          • Overview
          • PropertiesEntry
        • RuntimeInfo
          • Overview
          • EndpointsEntry
        • SecurityConfig
        • ShieldedInstanceConfig
        • SoftwareConfig
          • Overview
          • PropertiesEntry
        • SparkBatch
        • SparkHistoryServerConfig
        • SparkJob
          • Overview
          • PropertiesEntry
        • SparkRBatch
        • SparkRJob
          • Overview
          • PropertiesEntry
        • SparkSqlBatch
          • Overview
          • QueryVariablesEntry
        • SparkSqlJob
          • Overview
          • PropertiesEntry
          • ScriptVariablesEntry
        • StartClusterRequest
        • StopClusterRequest
        • SubmitJobRequest
        • TemplateParameter
        • UpdateAutoscalingPolicyRequest
        • UpdateClusterRequest
        • UpdateJobRequest
        • UpdateWorkflowTemplateRequest
        • ValueValidation
        • VirtualClusterConfig
        • WorkflowGraph
        • WorkflowMetadata
          • Overview
          • ParametersEntry
          • State
        • WorkflowNode
          • Overview
          • NodeState
        • WorkflowTemplate
          • Overview
          • LabelsEntry
        • WorkflowTemplatePlacement
        • YarnApplication
          • Overview
          • State
  • google-cloud-dataproc-metastore
  • google-cloud-datastore
  • google-cloud-datastream
  • google-cloud-deploy
  • google-cloud-developerconnect
  • google-cloud-devicestreaming
  • google-cloud-dialogflow
  • google-cloud-dialogflow-cx
  • google-cloud-discoveryengine
  • google-cloud-dlp
  • google-cloud-dns
  • google-cloud-documentai
  • google-cloud-domains
  • google-cloud-edgecontainer
  • google-cloud-edgenetwork
  • google-cloud-enterpriseknowledgegraph
  • google-cloud-essential-contacts
  • google-cloud-eventarc
  • google-cloud-eventarc-publishing
  • google-cloud-filestore
  • google-cloud-financialservices
  • google-cloud-firestore
  • google-cloud-functions
  • google-cloud-game-servers
  • google-cloud-gdchardwaremanagement
  • google-cloud-gke-backup
  • google-cloud-gke-hub
  • google-cloud-gke-multicloud
  • google-cloud-gsuiteaddons
  • google-cloud-iam
  • google-cloud-iam-logging
  • google-cloud-iap
  • google-cloud-ids
  • google-cloud-kms-inventory
  • google-cloud-language
  • google-cloud-life-sciences
  • google-cloud-logging
  • google-cloud-lustre
  • google-cloud-managed-identities
  • google-cloud-managedkafka
  • google-cloud-media-translation
  • google-cloud-memcache
  • google-cloud-memorystore
  • google-cloud-migrationcenter
  • google-cloud-modelarmor
  • google-cloud-monitoring
  • google-cloud-monitoring-dashboards
  • google-cloud-monitoring-metrics-scopes
  • google-cloud-netapp
  • google-cloud-network-connectivity
  • google-cloud-network-management
  • google-cloud-network-security
  • google-cloud-network-services
  • google-cloud-notebooks
  • google-cloud-optimization
  • google-cloud-oracledatabase
  • google-cloud-orchestration-airflow
  • google-cloud-org-policy
  • google-cloud-os-config
  • google-cloud-os-login
  • google-cloud-parallelstore
  • google-cloud-parametermanager
  • google-cloud-phishing-protection
  • google-cloud-policy-troubleshooter
  • google-cloud-policysimulator
  • google-cloud-policytroubleshooter-iam
  • google-cloud-private-ca
  • google-cloud-privilegedaccessmanager
  • google-cloud-public-ca
  • google-cloud-pubsub
  • google-cloud-pubsublite
  • google-cloud-quotas
  • google-cloud-rapidmigrationassessment
  • google-cloud-recaptcha-enterprise
  • google-cloud-recommendations-ai
  • google-cloud-recommender
  • google-cloud-redis
  • google-cloud-redis-cluster
  • google-cloud-retail
  • google-cloud-run
  • google-cloud-runtimeconfig
  • google-cloud-secret-manager
  • google-cloud-securesourcemanager
  • google-cloud-securitycenter
  • google-cloud-securitycentermanagement
  • google-cloud-service-control
  • google-cloud-service-directory
  • google-cloud-service-management
  • google-cloud-service-usage
  • google-cloud-servicehealth
  • google-cloud-source-context
  • google-cloud-spanner
  • google-cloud-speech
  • google-cloud-storage
  • google-cloud-storage-control
  • google-cloud-storage-transfer
  • google-cloud-storagebatchoperations
  • google-cloud-storageinsights
  • google-cloud-support
  • google-cloud-talent
  • google-cloud-telcoautomation
  • google-cloud-texttospeech
  • google-cloud-tpu
  • google-cloud-translate
  • google-cloud-video-live-stream
  • google-cloud-video-stitcher
  • google-cloud-video-transcoder
  • google-cloud-videointelligence
  • google-cloud-vision
  • google-cloud-visionai
  • google-cloud-vm-migration
  • google-cloud-vmwareengine
  • google-cloud-vpc-access
  • google-cloud-webrisk
  • google-cloud-websecurityscanner
  • google-cloud-workflows
  • google-cloud-workstations
  • google-resumable-media
  • googleapis-common-protos
  • grpc-google-iam-v1
  • langchain-google-alloydb-pg
  • langchain-google-bigtable
  • langchain-google-cloud-sql-mssql
  • langchain-google-cloud-sql-mysql
  • langchain-google-cloud-sql-pg
  • langchain-google-datastore
  • langchain-google-el-carro
  • langchain-google-firestore
  • langchain-google-memorystore-redis
  • langchain-google-spanner
  • llama-index-alloydb-pg
  • llama-index-cloud-sql-pg
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Networking
  • Observability and monitoring
  • Security
  • Storage
  • Access and resources management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
Some or all of the information on this page might not apply to Trusted Cloud by S3NS.
  • Home
  • Python
  • Documentation
  • Reference
Note: Some or all of the information on this page might not apply to Trusted Cloud. For a list of services that are available in Trusted Cloud, see Services available for Trusted Cloud.
  • 5.21.0 (latest)
  • 5.20.0
  • 5.18.1
  • 5.17.1
  • 5.16.0
  • 5.15.1
  • 5.14.0
  • 5.13.0
  • 5.12.0
  • 5.10.2
  • 5.9.3
  • 5.8.0
  • 5.7.0
  • 5.6.0
  • 5.5.1
  • 5.4.3
  • 5.3.0
  • 5.2.0
  • 5.1.0
  • 5.0.3
  • 4.0.3
  • 3.3.2
  • 3.2.0
  • 3.1.1
  • 3.0.0
  • 2.6.2
  • 2.5.0
  • 2.4.0
  • 2.3.1
  • 2.2.0
  • 2.0.2
  • 1.1.3
  • 1.0.1
  • 0.8.2
  • 0.7.0
  • 0.6.1
  • 0.5.0

Multiprocessing

NOTE: Because this client uses grpc library, it is safe to share instances across threads. In multiprocessing scenarios, the best practice is to create client instances after the invocation of os.fork() by multiprocessing.pool.Pool or multiprocessing.Process.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-02 UTC.

  • Terms
  • Privacy
  • Manage cookies